add grammar tests for nonlocal

This commit is contained in:
Benjamin Peterson 2008-10-24 22:16:39 +00:00
parent d03928614f
commit a933e520e8
1 changed files with 8 additions and 0 deletions

View File

@ -485,6 +485,14 @@ class GrammarTests(unittest.TestCase):
global a, b
global one, two, three, four, five, six, seven, eight, nine, ten
def testNonlocal(self):
# 'nonlocal' NAME (',' NAME)*
x = 0
y = 0
def f():
nonlocal x
nonlocal x, y
def testAssert(self):
# assert_stmt: 'assert' test [',' test]
assert 1