summaryrefslogtreecommitdiff
path: root/Lib/test/test_parser.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-05-25 21:02:56 +0000
committerGeorg Brandl <georg@python.org>2009-05-25 21:02:56 +0000
commit944f684ce6f439bc868d4b189c45f726dfb9d3b1 (patch)
tree3fd9c596e78b01836158508978ce8eab678bb37b /Lib/test/test_parser.py
parent04516611e7e4ceaef6fef9413719e9cb5b4bb087 (diff)
downloadcpython-git-944f684ce6f439bc868d4b189c45f726dfb9d3b1.tar.gz
Allow multiple context managers in one with statement, as proposed
in http://codereview.appspot.com/53094 and accepted by Guido. The construct is transformed into multiple With AST nodes so that there should be no problems with the semantics.
Diffstat (limited to 'Lib/test/test_parser.py')
-rw-r--r--Lib/test/test_parser.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py
index 23f418ee39..7d059c20f2 100644
--- a/Lib/test/test_parser.py
+++ b/Lib/test/test_parser.py
@@ -199,6 +199,7 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
def test_with(self):
self.check_suite("with open('x'): pass\n")
self.check_suite("with open('x') as f: pass\n")
+ self.check_suite("with open('x') as f, open('y') as g: pass\n")
def test_try_stmt(self):
self.check_suite("try: pass\nexcept: pass\n")