Merged revisions 82400 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r82400 | mark.dickinson | 2010-06-30 17:27:57 +0100 (Wed, 30 Jun 2010) | 2 lines

  Issue #9125:  Update parser module for "except ... as ..." syntax.
........
This commit is contained in:
Mark Dickinson 2010-06-30 16:33:23 +00:00
parent 284bc0e711
commit 9f11f39758
3 changed files with 15 additions and 4 deletions

View file

@ -210,6 +210,12 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
self.check_suite("try: pass\nexcept: pass\nelse: pass\n"
"finally: pass\n")
def test_except_clause(self):
self.check_suite("try: pass\nexcept: pass\n")
self.check_suite("try: pass\nexcept A: pass\n")
self.check_suite("try: pass\nexcept A, e: pass\n")
self.check_suite("try: pass\nexcept A as e: pass\n")
def test_position(self):
# An absolutely minimal test of position information. Better
# tests would be a big project.