Issue #9128: Validate class decorator syntax correctly in parser module.
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py
index dca904c..a964877 100644
--- a/Lib/test/test_parser.py
+++ b/Lib/test/test_parser.py
@@ -180,6 +180,14 @@
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 *")