diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_parser.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py index 23f418e..ca5f43f 100644 --- a/Lib/test/test_parser.py +++ b/Lib/test/test_parser.py @@ -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. |