mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Correct location for syntax error in try-except (GH-25939)
This commit is contained in:
parent
60ba0b6847
commit
8d4b18429d
3 changed files with 4 additions and 2 deletions
|
@ -218,7 +218,7 @@ class ExceptionTests(unittest.TestCase):
|
|||
check('class foo:return 1', 1, 11)
|
||||
check('def f():\n continue', 2, 3)
|
||||
check('def f():\n break', 2, 3)
|
||||
check('try:\n pass\nexcept:\n pass\nexcept ValueError:\n pass', 2, 3)
|
||||
check('try:\n pass\nexcept:\n pass\nexcept ValueError:\n pass', 3, 1)
|
||||
|
||||
# Errors thrown by tokenizer.c
|
||||
check('(0x+1)', 1, 3)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue