mirror of
https://github.com/python/cpython.git
synced 2025-10-21 22:22:48 +00:00
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:
parent
4ebc7e3bd0
commit
f4189916e3
5 changed files with 27 additions and 8 deletions
|
@ -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__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue