diff --git a/Lib/test/test_string_literals.py b/Lib/test/test_string_literals.py index 3d793427c9ab5d..849efaba6180f7 100644 --- a/Lib/test/test_string_literals.py +++ b/Lib/test/test_string_literals.py @@ -172,7 +172,7 @@ def test_invalid_escape_locations_with_offset(self): with warnings.catch_warnings(record=True) as w: warnings.simplefilter('error', category=SyntaxWarning) with self.assertRaises(SyntaxError) as cm: - eval("\"'''''''''''''''''''''invalid\ Escape\"") + eval("\"'''''''''''''''''''''invalid\\ Escape\"") exc = cm.exception self.assertEqual(w, []) self.assertEqual(exc.msg, r"invalid escape sequence '\ '") @@ -183,7 +183,7 @@ def test_invalid_escape_locations_with_offset(self): with warnings.catch_warnings(record=True) as w: warnings.simplefilter('error', category=SyntaxWarning) with self.assertRaises(SyntaxError) as cm: - eval("\"''Incorrect \ logic?\"") + eval("\"''Incorrect \\ logic?\"") exc = cm.exception self.assertEqual(w, []) self.assertEqual(exc.msg, r"invalid escape sequence '\ '")