mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Issue #9128: Fix validation of class decorators in parser module.
This commit is contained in:
parent
e9123efa21
commit
644bef795b
3 changed files with 19 additions and 8 deletions
|
@ -156,6 +156,14 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
|
|||
|
||||
def test_class_defs(self):
|
||||
self.check_suite("class foo():pass")
|
||||
self.check_suite("@class_decorator\n"
|
||||
"class foo():pass")
|
||||
self.check_suite("@class_decorator(arg)\n"
|
||||
"class foo():pass")
|
||||
self.check_suite("@decorator1\n"
|
||||
"@decorator2\n"
|
||||
"class foo():pass")
|
||||
|
||||
|
||||
def test_import_from_statement(self):
|
||||
self.check_suite("from sys.path import *")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue