mirror of
https://github.com/python/cpython.git
synced 2025-07-16 07:45:20 +00:00
Extend last change to cover TestSuites as well as TestCases.
This commit is contained in:
parent
6c85bcb2aa
commit
f3590623e9
1 changed files with 1 additions and 1 deletions
|
@ -251,7 +251,7 @@ def run_unittest(*classes):
|
|||
"""Run tests from unittest.TestCase-derived classes."""
|
||||
suite = unittest.TestSuite()
|
||||
for cls in classes:
|
||||
if isinstance(cls, unittest.TestCase):
|
||||
if isinstance(cls, (unittest.TestSuite, unittest.TestCase)):
|
||||
suite.addTest(cls)
|
||||
else:
|
||||
suite.addTest(unittest.makeSuite(cls))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue