Flush out support for `class B(): pass` syntax by adding support to the

'parser' module and 'compiler' package.

Closes patch #1176012.  Thanks logistix.
This commit is contained in:
Brett Cannon 2005-04-09 02:30:16 +00:00
parent 4ebc7e3bd0
commit f4189916e3
5 changed files with 27 additions and 8 deletions

View file

@ -33,6 +33,9 @@ class CompilerTest(unittest.TestCase):
else:
compiler.compile(buf, basename, "exec")
def testNewClassSyntax(self):
compiler.compile("class foo():pass\n\n","<string>","exec")
def testLineNo(self):
# Test that all nodes except Module have a correct lineno attribute.
filename = __file__