unittest is broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nose (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
python-defaults (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
python2.6 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
Bug 389942 is caused by this difference between -0ubuntu1 and -0ubuntu2 (jaunty and karmic):
--- a/Lib/unittest.py
+++ b/Lib/unittest.py
@@ -798,8 +798,10 @@ Examples:
"""
def __init__(self, module='__main__', defaultTest=None,
- argv=None, testRunner=
+ argv=None, testRunner=None,
+ if testRunner is None:
+ testRunner = TextTestRunner
if type(module) == type(''):
for part in module.
This changes fully breaks python-nose this way:
nosetests
Traceback (most recent call last):
File "/usr/bin/
load_
File "/usr/lib/
__init__
argv=argv, testRunner=
File "/usr/lib/
self.runTests()
File "/usr/lib/
runTests
result = self.testRunner
TypeError: unbound method run() must be called with TextTestRunner
instance as first argument (got ContextSuite instance instead)
If you revert this patch, nosetests is working again.
What was the driver of this patch? Would it break something if you revert it?...as least it would fix python-nose.
Hi Xavier,
As you note in your bug description, there is already a bug filed for this issue. Therefore, I'm marking this bug as a duplicate, and will open a python2.6 task on the parent bug.
I will not open a python-defaults task on the parent bug because I see no reason why python-defaults is involved.