mirror of
https://github.com/python/cpython.git
synced 2025-10-21 22:22:48 +00:00
Issue #14701: Merge fix from 3.2.
This commit is contained in:
commit
9fad160411
3 changed files with 21 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue