Skip to content

Commit bd1718f

Browse files
author
Edward Z. Yang ext:(%22)
committed
Fix test_parser.py to have working single-test runs, also add *.pyc to ignore list.
1 parent 8dc5873 commit bd1718f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/test_parser.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ def buildTestSuite():
133133
def testFunc(self, innerHTML=innerHTML, input=input,
134134
expected=expected, errors=errors, treeCls=treeCls):
135135
return self.runParserTest(innerHTML, input, expected, errors, treeCls)
136-
setattr(TestCase, "test_%s_%d_%s" % (testName,index+1,treeName),
136+
testFunc.__name__ = "test_%s_%d_%s" % (testName,index+1,treeName)
137+
setattr(TestCase, testFunc.__name__,
137138
testFunc)
138139

139140
return unittest.TestLoader().loadTestsFromTestCase(TestCase)

0 commit comments

Comments
 (0)