summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_exceptions.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-11-27 07:40:29 (GMT)
committerGitHub <noreply@github.com>2018-11-27 07:40:29 (GMT)
commitb619b097923155a7034c05c4018bf06af9f994d0 (patch)
treea9f0f2a6c1b2ef8ceccd02f18612e43dd5689420 /Lib/test/test_exceptions.py
parentd1cbc6f8a00cf881ced6238c5e652054e8fdc30f (diff)
downloadcpython-b619b097923155a7034c05c4018bf06af9f994d0.zip
cpython-b619b097923155a7034c05c4018bf06af9f994d0.tar.gz
cpython-b619b097923155a7034c05c4018bf06af9f994d0.tar.bz2
bpo-31241: Fix AST node position for list and generator comprehensions. (GH-10633)
The lineno and col_offset attributes of AST nodes for list comprehensions, generator expressions and tuples are now point to the opening parenthesis or square brace. For tuples without parenthesis they point to the position of the first item.
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r--Lib/test/test_exceptions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index 5353248..6ef529e 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -204,7 +204,7 @@ class ExceptionTests(unittest.TestCase):
check('x = 0o9', 1, 6)
# Errors thrown by symtable.c
- check('x = [(yield i) for i in range(3)]', 1, 6)
+ check('x = [(yield i) for i in range(3)]', 1, 5)
check('def f():\n from _ import *', 1, 1)
check('def f(x, x):\n pass', 1, 1)
check('def f(x):\n nonlocal x', 2, 3)