diff options
author | Thomas Grainger <tagrain@gmail.com> | 2025-03-26 14:01:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-26 14:01:18 (GMT) |
commit | 2d83891dfd51f595de68b0336b3bfc876f7b2507 (patch) | |
tree | 52f0295e90ab8fe2a40e5faf57ad3de59d6b7f0f /Lib/test/test_string_literals.py | |
parent | 5abff6960b4aecb0d5c81c7482cf3faa74e1983d (diff) | |
download | cpython-2d83891dfd51f595de68b0336b3bfc876f7b2507.zip cpython-2d83891dfd51f595de68b0336b3bfc876f7b2507.tar.gz cpython-2d83891dfd51f595de68b0336b3bfc876f7b2507.tar.bz2 |
gh-131649: fix test_string_literals SyntaxWarning (#131650)
Diffstat (limited to 'Lib/test/test_string_literals.py')
-rw-r--r-- | Lib/test/test_string_literals.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_string_literals.py b/Lib/test/test_string_literals.py index 9d57233..1800b17 100644 --- a/Lib/test/test_string_literals.py +++ b/Lib/test/test_string_literals.py @@ -177,7 +177,7 @@ class TestLiterals(unittest.TestCase): def test_invalid_escape_locations_with_offset(self): with warnings.catch_warnings(record=True) as w: warnings.simplefilter('always', category=SyntaxWarning) - eval("\"'''''''''''''''''''''invalid\ Escape\"") + eval("\"'''''''''''''''''''''invalid\\ Escape\"") self.assertEqual(len(w), 1) self.assertEqual(str(w[0].message), r'"\ " is an invalid escape sequence. Such sequences ' @@ -188,7 +188,7 @@ class TestLiterals(unittest.TestCase): with warnings.catch_warnings(record=True) as w: warnings.simplefilter('always', category=SyntaxWarning) - eval("\"''Incorrect \ logic?\"") + eval("\"''Incorrect \\ logic?\"") self.assertEqual(len(w), 1) self.assertEqual(str(w[0].message), r'"\ " is an invalid escape sequence. Such sequences ' |