diff options
author | Mark Dickinson <mdickinson@enthought.com> | 2012-05-07 11:01:27 (GMT) |
---|---|---|
committer | Mark Dickinson <mdickinson@enthought.com> | 2012-05-07 11:01:27 (GMT) |
commit | cf360b92099d3ebcd31f637e45df501f393ff0b0 (patch) | |
tree | 5d4d5de0c1669e26852f7ab73590438414892820 /Lib | |
parent | 640335c61f8939a98667203aee8c0123da47b55d (diff) | |
download | cpython-cf360b92099d3ebcd31f637e45df501f393ff0b0.zip cpython-cf360b92099d3ebcd31f637e45df501f393ff0b0.tar.gz cpython-cf360b92099d3ebcd31f637e45df501f393ff0b0.tar.bz2 |
Issue #14701: Add missing support for 'raise ... from' in parser module.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_parser.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py index f6105fc..edd1a09 100644 --- a/Lib/test/test_parser.py +++ b/Lib/test/test_parser.py @@ -297,6 +297,14 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase): self.check_suite("[*a, *b] = y") self.check_suite("for [*x, b] in x: pass") + def test_raise_statement(self): + self.check_suite("raise\n") + self.check_suite("raise e\n") + self.check_suite("try:\n" + " suite\n" + "except Exception as e:\n" + " raise ValueError from e\n") + # # Second, we take *invalid* trees and make sure we get ParserError |