Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f828e2d

Browse files
committed
Add simple section for assert, including assert w/ lambdas
1 parent 384639f commit f828e2d

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

Lib/test/output/test_grammar

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ raise_stmt
3737
import_stmt
3838
global_stmt
3939
exec_stmt
40+
assert_stmt
4041
if_stmt
4142
while_stmt
4243
for_stmt

Lib/test/test_grammar.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,12 @@ def f():
417417
if (g, l) != ({'a':1}, {'b':2}): raise TestFailed, 'exec ... in g (%s), l (%s)' %(g,l)
418418

419419

420+
print "assert_stmt" # assert_stmt: 'assert' test [',' test]
421+
assert 1
422+
assert 1, 1
423+
assert lambda x:x
424+
assert 1, lambda x:x+1
425+
420426
### compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef
421427
# Tested below
422428

0 commit comments

Comments
 (0)