Improve test coverage. Hope the test_file changes work the same on windows.

This commit is contained in:
Neal Norwitz 2005-11-27 20:37:43 +00:00
parent 307021f40b
commit fcf4435ae0
5 changed files with 75 additions and 0 deletions

View file

@ -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)