[TIP] 2.6.3 unittest change breaks nose
fuzzyman at voidspace.org.uk
Sat Jul 4 13:38:44 PDT 2009
jason pellerin wrote:
> On Sat, Jul 4, 2009 at 3:06 PM, Michael Foord<fuzzyman at voidspace.org.uk> wrote:
>> The change can't be reverted as it was a bugfix, but a different change
>> could be applied. Is nose actually modifying the behaviour of
>> TestProgram.runTests ? That isn't intended to be used directly except
>> through main - and tying yourself very closely to its implementation details
>> seems like a recipe for this kind of problem.
> nose has to do some plugin setup and such around running tests, and it
> uses a custom runner, so it overrides runTests(), since that used to
> be the place where the test runner was initialized. In TestProgram in
> 2.5 and earlier, setting self.testRunner is deferred to runTests.
> Changing back to that would be ideal for nose.
Why not just pass in your custom test runner?
Monkey-patching TestProgram.runTests seems like a really bad idea...
> Though if I'm reading Barry's message right, the point is moot. If
> 2.6.3 goes out (has gone out?) with this change, then I'll have to put
> out new releases of nose 0.10 and 0.11.
> Here's the bug report I filed: http://bugs.python.org/issue6418 -- let
> me know if it's not clear enough or if it can be improved otherwise.
It's missing a patch... :-)
More information about the testing-in-python