mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Issue #9125: Update parser module for "except ... as ..." syntax.
This commit is contained in:
parent
2037913507
commit
070f0abc19
3 changed files with 14 additions and 4 deletions
|
@ -235,6 +235,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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue