diff options
Diffstat (limited to 'Lib/test/test_grammar.py')
-rw-r--r-- | Lib/test/test_grammar.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py index 6e0fe91..b7af64a 100644 --- a/Lib/test/test_grammar.py +++ b/Lib/test/test_grammar.py @@ -349,6 +349,25 @@ print 'continue_stmt' # 'continue' i = 1 while i: i = 0; continue +msg = "" +while not msg: + msg = "continue + try/except ok" + try: + continue + msg = "continue failed to continue inside try" + except: + msg = "continue inside try called except block" +print msg + +msg = "" +while not msg: + msg = "finally block not called" + try: + continue + finally: + msg = "continue + try/finally ok" +print msg + print 'return_stmt' # 'return' [testlist] def g1(): return def g2(): return 1 |