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:
Guido van Rossum 2007-11-15 19:17:28 +00:00
parent a1e9ec4e55
commit fc158e25d6
2 changed files with 13 additions and 12 deletions

View file

@ -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 *")

View file

@ -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) {