diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-11-24 04:19:49 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-11-24 04:19:49 (GMT) |
commit | 9e233a545c681118f453d2300b4af2317273dfaa (patch) | |
tree | 2f9f9c22a0a8a7f2b13413133ab53b0f517c3e21 /Lib/test | |
parent | d8ab1e4751132a4bd0cf1029ad92a51b028cd6cc (diff) | |
download | cpython-9e233a545c681118f453d2300b4af2317273dfaa.zip cpython-9e233a545c681118f453d2300b4af2317273dfaa.tar.gz cpython-9e233a545c681118f453d2300b4af2317273dfaa.tar.bz2 |
Merged revisions 67365 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r67365 | benjamin.peterson | 2008-11-23 22:09:03 -0600 (Sun, 23 Nov 2008) | 1 line
#4396 make the parser module correctly validate the with syntax
........
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_parser.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py index 94b6113..1069606 100644 --- a/Lib/test/test_parser.py +++ b/Lib/test/test_parser.py @@ -196,6 +196,10 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase): def test_assert(self): self.check_suite("assert alo < ahi and blo < bhi\n") + def test_with(self): + self.check_suite("with open('x'): pass\n") + self.check_suite("with open('x') as f: pass\n") + def test_position(self): # An absolutely minimal test of position information. Better # tests would be a big project. |