mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Improve test coverage. Hope the test_file changes work the same on windows.
This commit is contained in:
parent
307021f40b
commit
fcf4435ae0
5 changed files with 75 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue