summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-06-30 16:27:57 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2010-06-30 16:27:57 (GMT)
commit070f0abc1978f87922cc200a6caeb37852d526ad (patch)
treedb79608b2504e22d332e194a91aed0dd6d6ea9aa /Lib
parent20379135076182fc185fee15f918df6d44924d4c (diff)
downloadcpython-070f0abc1978f87922cc200a6caeb37852d526ad.zip
cpython-070f0abc1978f87922cc200a6caeb37852d526ad.tar.gz
cpython-070f0abc1978f87922cc200a6caeb37852d526ad.tar.bz2
Issue #9125: Update parser module for "except ... as ..." syntax.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_parser.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py
index 07a4c32..dca904c 100644
--- a/Lib/test/test_parser.py
+++ b/Lib/test/test_parser.py
@@ -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.