mirror of
https://github.com/python/cpython.git
synced 2025-08-27 04:05:34 +00:00
gh-126139: Improve error message location for future statement with unknown feature (#126140)
This commit is contained in:
parent
9dfef4e5f4
commit
224c370a36
4 changed files with 18 additions and 8 deletions
|
@ -319,8 +319,8 @@ class ExceptionTests(unittest.TestCase):
|
|||
check('def f():\n global x\n nonlocal x', 2, 3)
|
||||
|
||||
# Errors thrown by future.c
|
||||
check('from __future__ import doesnt_exist', 1, 1)
|
||||
check('from __future__ import braces', 1, 1)
|
||||
check('from __future__ import doesnt_exist', 1, 24)
|
||||
check('from __future__ import braces', 1, 24)
|
||||
check('x=1\nfrom __future__ import division', 2, 1)
|
||||
check('foo(1=2)', 1, 5)
|
||||
check('def f():\n x, y: int', 2, 3)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue