diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/output/test_grammar | 1 | ||||
-rw-r--r-- | Lib/test/test_grammar.py | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/output/test_grammar b/Lib/test/output/test_grammar index 203cf18..8a0c531 100644 --- a/Lib/test/output/test_grammar +++ b/Lib/test/output/test_grammar @@ -55,4 +55,5 @@ classdef [(1, 'Apple'), (1, 'Banana'), (1, 'Coconut'), (2, 'Apple'), (2, 'Banana'), (2, 'Coconut'), (3, 'Apple'), (3, 'Banana'), (3, 'Coconut'), (4, 'Apple'), (4, 'Banana'), (4, 'Coconut'), (5, 'Apple'), (5, 'Banana'), (5, 'Coconut')] [(1, 'Banana'), (1, 'Coconut'), (2, 'Banana'), (2, 'Coconut'), (3, 'Banana'), (3, 'Coconut'), (4, 'Banana'), (4, 'Coconut'), (5, 'Banana'), (5, 'Coconut')] good: got a SyntaxError as expected +good: got a SyntaxError as expected [('Boeing', 'Airliner'), ('Boeing', 'Engine'), ('Ford', 'Engine'), ('Macdonalds', 'Cheeseburger')] diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py index da74444..b0e3da9 100644 --- a/Lib/test/test_grammar.py +++ b/Lib/test/test_grammar.py @@ -578,6 +578,12 @@ try: except SyntaxError: print "good: got a SyntaxError as expected" +try: + eval("[x if y]") + print "FAIL: should have raised a SyntaxError!" +except SyntaxError: + print "good: got a SyntaxError as expected" + suppliers = [ (1, "Boeing"), (2, "Ford"), |