summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_parser.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-07-04 16:23:54 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2010-07-04 16:23:54 (GMT)
commita7ee59b3d33327ec6f9f34da97d16344a1121199 (patch)
tree7890243094f88b7105d353e34214e94a8f13460c /Lib/test/test_parser.py
parent96c4df4532de5b4b223ef4f31aacbe6a97bf65b0 (diff)
downloadcpython-a7ee59b3d33327ec6f9f34da97d16344a1121199.zip
cpython-a7ee59b3d33327ec6f9f34da97d16344a1121199.tar.gz
cpython-a7ee59b3d33327ec6f9f34da97d16344a1121199.tar.bz2
Issue #9128: Validate class decorator syntax correctly in parser module.
Diffstat (limited to 'Lib/test/test_parser.py')
-rw-r--r--Lib/test/test_parser.py8
1 files changed, 8 insertions, 0 deletions
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 @@ 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 *")