mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +00:00
Issue #15132: Allow a list for the defaultTest argument of unittest.TestProgram
Patch by Jyrki Pulliainen
This commit is contained in:
parent
d784e53d96
commit
20054477f4
3 changed files with 42 additions and 1 deletions
|
@ -164,7 +164,10 @@ class TestProgram(object):
|
|||
# to support python -m unittest ...
|
||||
self.module = None
|
||||
else:
|
||||
self.testNames = (self.defaultTest,)
|
||||
if isinstance(self.defaultTest, str):
|
||||
self.testNames = (self.defaultTest,)
|
||||
else:
|
||||
self.testNames = list(self.defaultTest)
|
||||
self.createTests()
|
||||
|
||||
def createTests(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue