Issue #183: Really fix test command with Python 3.1.

parent 68012655
...@@ -2,6 +2,12 @@ ...@@ -2,6 +2,12 @@
CHANGES CHANGES
======= =======
-----
3.4.3
-----
* Issue #183: Really fix test command with Python 3.1.
----- -----
3.4.2 3.4.2
----- -----
......
...@@ -44,9 +44,9 @@ unittest_main = unittest.main ...@@ -44,9 +44,9 @@ unittest_main = unittest.main
_PY31 = (3, 1) <= sys.version_info[:2] < (3, 2) _PY31 = (3, 1) <= sys.version_info[:2] < (3, 2)
if _PY31: if _PY31:
# on Python 3.1, translate testRunner==None to defaultTestLoader # on Python 3.1, translate testRunner==None to TextTestRunner
# for compatibility with Python 2.6, 2.7, and 3.2+ # for compatibility with Python 2.6, 2.7, and 3.2+
def unittest_main(*args, **kwargs): def unittest_main(*args, **kwargs):
if 'testRunner' in kwargs and kwargs['testRunner'] is None: if 'testRunner' in kwargs and kwargs['testRunner'] is None:
kwargs['testRunner'] = unittest.defaultTestLoader kwargs['testRunner'] = unittest.TextTestRunner
return unittest.main(*args, **kwargs) return unittest.main(*args, **kwargs)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment