diff options
author | Mark Dickinson <mdickinson@enthought.com> | 2012-04-29 21:20:01 (GMT) |
---|---|---|
committer | Mark Dickinson <mdickinson@enthought.com> | 2012-04-29 21:20:01 (GMT) |
commit | 57404891a05fe1d5a70fc55ae84e75fe12fc7535 (patch) | |
tree | 5e6dfdbf0d212145389ce956f160ad1eec28e5be /Lib/test/test_parser.py | |
parent | 53c6651a172e2fc349c16603101a8e02442daaa2 (diff) | |
parent | 407b3bd89b877c198bf9cdbf290ddb91b49910b5 (diff) | |
download | cpython-57404891a05fe1d5a70fc55ae84e75fe12fc7535.zip cpython-57404891a05fe1d5a70fc55ae84e75fe12fc7535.tar.gz cpython-57404891a05fe1d5a70fc55ae84e75fe12fc7535.tar.bz2 |
Issue #14696: Merge from 3.2
Diffstat (limited to 'Lib/test/test_parser.py')
-rw-r--r-- | Lib/test/test_parser.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py index d13cf2b..46e7b9e 100644 --- a/Lib/test/test_parser.py +++ b/Lib/test/test_parser.py @@ -61,6 +61,16 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase): " if (yield):\n" " yield x\n") + def test_nonlocal_statement(self): + self.check_suite("def f():\n" + " x = 0\n" + " def g():\n" + " nonlocal x\n") + self.check_suite("def f():\n" + " x = y = 0\n" + " def g():\n" + " nonlocal x, y\n") + def test_expressions(self): self.check_expr("foo(1)") self.check_expr("[1, 2, 3]") |