mirror of
https://github.com/python/cpython.git
synced 2025-07-15 23:35:23 +00:00
bpo-44317: Improve tokenizer errors with more informative locations (GH-26555) (GH-27079)
(cherry picked from commit f24777c2b3
)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
This commit is contained in:
parent
2f7636887e
commit
2a722d4fab
3 changed files with 57 additions and 20 deletions
|
@ -226,9 +226,9 @@ class ExceptionTests(unittest.TestCase):
|
|||
# Errors thrown by tokenizer.c
|
||||
check('(0x+1)', 1, 3)
|
||||
check('x = 0xI', 1, 6)
|
||||
check('0010 + 2', 1, 4)
|
||||
check('0010 + 2', 1, 1)
|
||||
check('x = 32e-+4', 1, 8)
|
||||
check('x = 0o9', 1, 6)
|
||||
check('x = 0o9', 1, 7)
|
||||
check('\u03b1 = 0xI', 1, 6)
|
||||
check(b'\xce\xb1 = 0xI', 1, 6)
|
||||
check(b'# -*- coding: iso8859-7 -*-\n\xe1 = 0xI', 2, 6,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue