diff options
author | Georg Brandl <georg@python.org> | 2009-05-25 21:02:56 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-05-25 21:02:56 +0000 |
commit | 944f684ce6f439bc868d4b189c45f726dfb9d3b1 (patch) | |
tree | 3fd9c596e78b01836158508978ce8eab678bb37b /Lib/test/test_parser.py | |
parent | 04516611e7e4ceaef6fef9413719e9cb5b4bb087 (diff) | |
download | cpython-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.py | 1 |
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") |