diff options
author | Raymond Hettinger <python@rcn.com> | 2012-04-29 21:57:05 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2012-04-29 21:57:05 (GMT) |
commit | a6df2ee7d084f830f100a5bd563005389d7d20c4 (patch) | |
tree | aa895645c077eef4653abac633cf5e35ec4f306d /Lib/test/test_parser.py | |
parent | 9f0ab9f5649b9b6ee54a023e83417f244b4665a0 (diff) | |
parent | 57404891a05fe1d5a70fc55ae84e75fe12fc7535 (diff) | |
download | cpython-a6df2ee7d084f830f100a5bd563005389d7d20c4.zip cpython-a6df2ee7d084f830f100a5bd563005389d7d20c4.tar.gz cpython-a6df2ee7d084f830f100a5bd563005389d7d20c4.tar.bz2 |
merge
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]") |