summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-02-19 15:54:52 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-02-19 15:54:52 (GMT)
commitf828e2d7370bf02e79bd4e58e63656332166b1dc (patch)
tree854a35a7735b3bc080ac7b307c68bde1ff1e3c7b /Lib
parent384639f80ec8154333b42063bb769296b3a708ca (diff)
downloadcpython-f828e2d7370bf02e79bd4e58e63656332166b1dc.zip
cpython-f828e2d7370bf02e79bd4e58e63656332166b1dc.tar.gz
cpython-f828e2d7370bf02e79bd4e58e63656332166b1dc.tar.bz2
Add simple section for assert, including assert w/ lambdas
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/output/test_grammar1
-rw-r--r--Lib/test/test_grammar.py6
2 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/output/test_grammar b/Lib/test/output/test_grammar
index 70d8836..927b4fe 100644
--- a/Lib/test/output/test_grammar
+++ b/Lib/test/output/test_grammar
@@ -37,6 +37,7 @@ raise_stmt
import_stmt
global_stmt
exec_stmt
+assert_stmt
if_stmt
while_stmt
for_stmt
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py
index 781f373..587d7ec 100644
--- a/Lib/test/test_grammar.py
+++ b/Lib/test/test_grammar.py
@@ -417,6 +417,12 @@ if l.has_key('__builtins__'): del l['__builtins__']
if (g, l) != ({'a':1}, {'b':2}): raise TestFailed, 'exec ... in g (%s), l (%s)' %(g,l)
+print "assert_stmt" # assert_stmt: 'assert' test [',' test]
+assert 1
+assert 1, 1
+assert lambda x:x
+assert 1, lambda x:x+1
+
### compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef
# Tested below