From 2bd61a988f3598db41feed19e55efac3eb10bf01 Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Sun, 4 Jul 2010 16:37:31 +0000 Subject: Issue #9128: Fix validation of class decorators in parser module. --- Lib/test/test_parser.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Lib/test/test_parser.py') diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py index 071d3622df5..96f14f62bb1 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 *") -- cgit v1.2.3