benjamin.peterson
2008-10-24 22:16:39 UTC
Author: benjamin.peterson
Date: Sat Oct 25 00:16:39 2008
New Revision: 67010
Log:
add grammar tests for nonlocal
Modified:
python/branches/py3k/Lib/test/test_grammar.py
Modified: python/branches/py3k/Lib/test/test_grammar.py
==============================================================================
--- python/branches/py3k/Lib/test/test_grammar.py (original)
+++ python/branches/py3k/Lib/test/test_grammar.py Sat Oct 25 00:16:39 2008
@@ -485,6 +485,14 @@
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
Date: Sat Oct 25 00:16:39 2008
New Revision: 67010
Log:
add grammar tests for nonlocal
Modified:
python/branches/py3k/Lib/test/test_grammar.py
Modified: python/branches/py3k/Lib/test/test_grammar.py
==============================================================================
--- python/branches/py3k/Lib/test/test_grammar.py (original)
+++ python/branches/py3k/Lib/test/test_grammar.py Sat Oct 25 00:16:39 2008
@@ -485,6 +485,14 @@
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