diff options
author | Petri Lehtinen <petri@digip.org> | 2013-02-23 17:52:51 (GMT) |
---|---|---|
committer | Petri Lehtinen <petri@digip.org> | 2013-02-23 17:55:49 (GMT) |
commit | 20054477f4671150e098b519dc1b85d7db6d27ab (patch) | |
tree | e2923f8ac088152e4919f2726273bc21c2d52b0a /Lib/unittest/main.py | |
parent | d784e53d9683b26822cc08b02a4bc6cb5a482e66 (diff) | |
download | cpython-20054477f4671150e098b519dc1b85d7db6d27ab.zip cpython-20054477f4671150e098b519dc1b85d7db6d27ab.tar.gz cpython-20054477f4671150e098b519dc1b85d7db6d27ab.tar.bz2 |
Issue #15132: Allow a list for the defaultTest argument of unittest.TestProgram
Patch by Jyrki Pulliainen
Diffstat (limited to 'Lib/unittest/main.py')
-rw-r--r-- | Lib/unittest/main.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/unittest/main.py b/Lib/unittest/main.py index ead6493..edb141a 100644 --- a/Lib/unittest/main.py +++ b/Lib/unittest/main.py @@ -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): |