summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_parser.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-07-04 16:37:31 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2010-07-04 16:37:31 (GMT)
commit2bd61a988f3598db41feed19e55efac3eb10bf01 (patch)
tree5148a2da5a62f7398a0fe6f4dbbbb4cfa71dcffa /Lib/test/test_parser.py
parent9a492acc14c499f0ec675d58814c9242ed90c021 (diff)
downloadcpython-2bd61a988f3598db41feed19e55efac3eb10bf01.zip
cpython-2bd61a988f3598db41feed19e55efac3eb10bf01.tar.gz
cpython-2bd61a988f3598db41feed19e55efac3eb10bf01.tar.bz2
Issue #9128: Fix validation of class decorators in parser module.
Diffstat (limited to 'Lib/test/test_parser.py')
-rw-r--r--Lib/test/test_parser.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py
index 071d362..96f14f6 100644
--- a/Lib/test/test_parser.py
+++ b/Lib/test/test_parser.py
@@ -149,6 +149,13 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
def test_class_defs(self):
self.check_suite("class foo():pass")
self.check_suite("class foo(object):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 *")