summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ast.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-02-14 00:22:14 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-02-14 00:22:14 (GMT)
commite84fde981dd957f53ec81e2d6f14a7cf418a9925 (patch)
treee7f181a4d2f86dde6d1dd7b755bf3550fcf1ec73 /Lib/test/test_ast.py
parent933538edde3bfe856f66d6c893ed4d3399769f94 (diff)
downloadcpython-e84fde981dd957f53ec81e2d6f14a7cf418a9925.zip
cpython-e84fde981dd957f53ec81e2d6f14a7cf418a9925.tar.gz
cpython-e84fde981dd957f53ec81e2d6f14a7cf418a9925.tar.bz2
set line and column numbers for keyword-only arg nodes (closes #20619)
Diffstat (limited to 'Lib/test/test_ast.py')
-rw-r--r--Lib/test/test_ast.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py
index e69422a..f17c93f 100644
--- a/Lib/test/test_ast.py
+++ b/Lib/test/test_ast.py
@@ -37,7 +37,7 @@ exec_tests = [
# FunctionDef with kwargs
"def f(**kwargs): pass",
# FunctionDef with all kind of args
- "def f(a, b=1, c=None, d=[], e={}, *args, **kwargs): pass",
+ "def f(a, b=1, c=None, d=[], e={}, *args, f=42, **kwargs): pass",
# ClassDef
"class C:pass",
# ClassDef, new style class
@@ -973,7 +973,7 @@ exec_results = [
('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [('arg', (1, 6), 'a', None)], None, [], [], None, [('Num', (1, 8), 0)]), [('Pass', (1, 12))], [], None)]),
('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], ('arg', (1, 7), 'args', None), [], [], None, []), [('Pass', (1, 14))], [], None)]),
('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], None, [], [], ('arg', (1, 8), 'kwargs', None), []), [('Pass', (1, 17))], [], None)]),
-('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [('arg', (1, 6), 'a', None), ('arg', (1, 9), 'b', None), ('arg', (1, 14), 'c', None), ('arg', (1, 22), 'd', None), ('arg', (1, 28), 'e', None)], ('arg', (1, 35), 'args', None), [], [], ('arg', (1, 43), 'kwargs', None), [('Num', (1, 11), 1), ('NameConstant', (1, 16), None), ('List', (1, 24), [], ('Load',)), ('Dict', (1, 30), [], [])]), [('Pass', (1, 52))], [], None)]),
+ ('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [('arg', (1, 6), 'a', None), ('arg', (1, 9), 'b', None), ('arg', (1, 14), 'c', None), ('arg', (1, 22), 'd', None), ('arg', (1, 28), 'e', None)], ('arg', (1, 35), 'args', None), [('arg', (1, 41), 'f', None)], [('Num', (1, 43), 42)], ('arg', (1, 49), 'kwargs', None), [('Num', (1, 11), 1), ('NameConstant', (1, 16), None), ('List', (1, 24), [], ('Load',)), ('Dict', (1, 30), [], [])]), [('Pass', (1, 58))], [], None)]),
('Module', [('ClassDef', (1, 0), 'C', [], [], None, None, [('Pass', (1, 8))], [])]),
('Module', [('ClassDef', (1, 0), 'C', [('Name', (1, 8), 'object', ('Load',))], [], None, None, [('Pass', (1, 17))], [])]),
('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], None, [], [], None, []), [('Return', (1, 8), ('Num', (1, 15), 1))], [], None)]),