[Distutils] [issue56] [PATCH] python setup.py test in python2.6

lregebro setuptools at bugs.python.org
Sun Dec 7 14:05:33 CET 2008


New submission from lregebro <regebro at gmail.com>:

In Python 2.6, the default of the testRunner parameter when calling
unittest.main is no longer None, but is instead TextTestRunner. Calling it with
None explicitly says to use None as a test runner, so that will fail, meaning
you can't run "python2.6 setup.py test", instead you get a AttributeError:
'NoneType' object has no attribute 'run' in unittest.py line 861.

There are two solutions, either set the runner variable to TextTestRunner for
versions > 2.5, or not pass in the parameter when it is None. I'm not sure which
one is seen as neater, so I'll provide both at patches, version A and B.

----------
messages: 216
nosy: lregebro
priority: bug
status: unread
title: [PATCH] python setup.py test in python2.6

_______________________________________________
Setuptools tracker <setuptools at bugs.python.org>
<http://bugs.python.org/setuptools/issue56>
_______________________________________________


More information about the Distutils-SIG mailing list