mirror of
https://github.com/python/cpython.git
synced 2025-08-26 19:55:24 +00:00
gh-116042: Fix location for SyntaxErrors of invalid escapes in the tokenizer (#116049)
This commit is contained in:
parent
49b11033bd
commit
56eda25633
5 changed files with 80 additions and 17 deletions
|
@ -660,7 +660,7 @@ class CmdLineTest(unittest.TestCase):
|
|||
self.assertEqual(
|
||||
stderr.splitlines()[-3:],
|
||||
[ b' foo = """\\q"""',
|
||||
b' ^^^^^^^^',
|
||||
b' ^^',
|
||||
b'SyntaxError: "\\q" is an invalid escape sequence. '
|
||||
b'Did you mean "\\\\q"? A raw string is also an option.'
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue