mirror of
https://github.com/python/cpython.git
synced 2025-08-27 12:16:04 +00:00
gh-88535: Improve syntax error for wrongly closed strings (#26633)
This commit is contained in:
parent
56eda25633
commit
6fb5138776
6 changed files with 1098 additions and 930 deletions
|
@ -2303,7 +2303,7 @@ class SyntaxErrorTests(unittest.TestCase):
|
|||
)
|
||||
err = run_script(source.encode('cp437'))
|
||||
self.assertEqual(err[-3], ' "¢¢¢¢¢¢" + f(4, x for x in range(1))')
|
||||
self.assertEqual(err[-2], ' ^^^^^^^^^^^^^^^^^^^')
|
||||
self.assertEqual(err[-2], ' ^^^')
|
||||
|
||||
# Check backwards tokenizer errors
|
||||
source = '# -*- coding: ascii -*-\n\n(\n'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue