diff options
author | Mark Dickinson <mdickinson@enthought.com> | 2012-05-07 11:03:11 (GMT) |
---|---|---|
committer | Mark Dickinson <mdickinson@enthought.com> | 2012-05-07 11:03:11 (GMT) |
commit | 9fad1604110cd7a0bb32792aa6d6c6a63018d51e (patch) | |
tree | 6bed6f14f66a1ec3fb9fa30c70c97cdd05f9df90 /Lib/test/test_parser.py | |
parent | 99e2e5552ab6a105b188273658784963bb9a915c (diff) | |
parent | cf360b92099d3ebcd31f637e45df501f393ff0b0 (diff) | |
download | cpython-9fad1604110cd7a0bb32792aa6d6c6a63018d51e.zip cpython-9fad1604110cd7a0bb32792aa6d6c6a63018d51e.tar.gz cpython-9fad1604110cd7a0bb32792aa6d6c6a63018d51e.tar.bz2 |
Issue #14701: Merge fix from 3.2.
Diffstat (limited to 'Lib/test/test_parser.py')
-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 46e7b9e..8eb3ee3 100644 --- a/Lib/test/test_parser.py +++ b/Lib/test/test_parser.py @@ -301,6 +301,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 |