Issue #9128: Validate class decorator syntax correctly in parser module.

This commit is contained in:
Mark Dickinson 2010-07-04 16:23:54 +00:00
parent 96c4df4532
commit a7ee59b3d3
3 changed files with 18 additions and 8 deletions

View file

@ -180,6 +180,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 *")