diff options
Diffstat (limited to 'Lib/test/test_syntax.py')
-rw-r--r-- | Lib/test/test_syntax.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py index 4838608..14f4c95 100644 --- a/Lib/test/test_syntax.py +++ b/Lib/test/test_syntax.py @@ -42,6 +42,18 @@ class SyntaxTestCase(unittest.TestCase): self._check_error(source, "global") warnings.filters.pop(0) + def test_break_outside_loop(self): + self._check_error("break", "outside loop") + + def test_delete_deref(self): + source = re.sub('(?m)^ *:', '', """\ + :def foo(x): + : def bar(): + : print x + : del x + :""") + self._check_error(source, "nested scope") + def test_main(): test_support.run_unittest(SyntaxTestCase) |