summaryrefslogtreecommitdiffstats
path: root/Lib/test/output
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-12-11 22:12:09 (GMT)
committerFred Drake <fdrake@acm.org>2000-12-11 22:12:09 (GMT)
commite1578ce20464dfda61d3b113f95fd006783beed6 (patch)
treede0d1bd09385af6b87215afcc0a92f90a9e3b002 /Lib/test/output
parentb6429a202011c92e34062930fc3e3818053a126d (diff)
downloadcpython-e1578ce20464dfda61d3b113f95fd006783beed6.zip
cpython-e1578ce20464dfda61d3b113f95fd006783beed6.tar.gz
cpython-e1578ce20464dfda61d3b113f95fd006783beed6.tar.bz2
Added tests to avoid regression on bug #125375.
roundtrip(): Show the offending syntax tree when things break; this makes it a little easier to debug the module by adding test cases. (Still need better tests for this module, but there's not enough time today.)
Diffstat (limited to 'Lib/test/output')
-rw-r--r--Lib/test/output/test_parser14
1 files changed, 14 insertions, 0 deletions
diff --git a/Lib/test/output/test_parser b/Lib/test/output/test_parser
index 86ec22d..7558641 100644
--- a/Lib/test/output/test_parser
+++ b/Lib/test/output/test_parser
@@ -15,6 +15,18 @@ expr: foo(a, b, c, *args)
expr: foo(a, b, c, *args, **kw)
expr: foo(a, b, c, **kw)
expr: foo + bar
+expr: lambda: 0
+expr: lambda x: 0
+expr: lambda *y: 0
+expr: lambda *y, **z: 0
+expr: lambda **z: 0
+expr: lambda x, y: 0
+expr: lambda foo=bar: 0
+expr: lambda foo=bar, spaz=nifty+spit: 0
+expr: lambda foo=bar, **z: 0
+expr: lambda foo=bar, blaz=blat+2, **z: 0
+expr: lambda foo=bar, blaz=blat+2, *y, **z: 0
+expr: lambda x, *y, **z: 0
Statements:
suite: print
@@ -37,6 +49,8 @@ suite: a ^= b
suite: a <<= b
suite: a >>= b
suite: a **= b
+suite: def f(): pass
+suite: def f(foo=bar): pass
Invalid parse trees: