mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
Issue #14696: Merge from 3.2
This commit is contained in:
commit
57404891a0
3 changed files with 48 additions and 5 deletions
|
@ -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]")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue