mirror of
https://github.com/python/cpython.git
synced 2025-10-13 18:33:34 +00:00
Patch 1144 by David Binger, fix for parser module. With unittest.
(I also cleared out all trailing whitespace in the C file.)
This commit is contained in:
parent
a1e9ec4e55
commit
fc158e25d6
2 changed files with 13 additions and 12 deletions
|
@ -136,6 +136,7 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
|
|||
|
||||
def test_class_defs(self):
|
||||
self.check_suite("class foo():pass")
|
||||
self.check_suite("class foo(object):pass")
|
||||
|
||||
def test_import_from_statement(self):
|
||||
self.check_suite("from sys.path import *")
|
||||
|
|
|
@ -992,7 +992,7 @@ validate_class(node *tree)
|
|||
if (res) {
|
||||
if (nch == 7) {
|
||||
res = ((validate_lparen(CHILD(tree, 2)) &&
|
||||
validate_testlist(CHILD(tree, 3)) &&
|
||||
validate_arglist(CHILD(tree, 3)) &&
|
||||
validate_rparen(CHILD(tree, 4))));
|
||||
}
|
||||
else if (nch == 6) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue