10000 Fix test_parser.py to have working single-test runs, also add *.pyc t… · awesome-python/html5lib-python@bd1718f · GitHub
[go: up one dir, main page]

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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)
0