[TIP] testtools MultiTestResult

Michael Foord michael at voidspace.org.uk
Fri Oct 15 03:48:46 PDT 2010

  On 15/10/2010 11:46, Jonathan Lange wrote:
> On Fri, Oct 15, 2010 at 11:35 AM, Michael Foord
> <michael at voidspace.org.uk>  wrote:
>>   Hello testing in Python folk,
>> Is the testtools MultiTestResult documented anywhere?
> There's a class docstring. That's it.
>> If it *is* may I suggest better documentation links on the PyPI and
>> launchpad pages. If it isn't, grrrrr...
> I'll try to make it better sometime soon –
> https://bugs.edge.launchpad.net/testtools/+bug/661116. Ideally, I'd
> love someone with the energy and wherewithal to maintain live API docs
> from trunk&  latest release. The cron job I set up myself stopped
> working weeks ago and has been on my "to do" list since.
> FWIW, you just give the constructor a bunch of TestResults and then
> MultiTR forwards the events it receives on to each of those
> TestResults.


 From looking at the code, as far as I can see testtools only provides 
TestResult objects and none that derive from _TextTestResult. Even the 
testtools TextTestResult doesn't derive from _TextTestResult.

The unittest test runner is TextTestRunner. This *requires* a 
_TextTestResult because the test runner calls result.printErrors. 
(Questioning the wisdom of that is perfectly valid but long pre-dates my 

It seems I can't use any of the testtools result objects with the 
standard unittest test runner. :-(

All the best,

Michael Foord
> jml



READ CAREFULLY. By accepting and reading this email you agree,
on behalf of your employer, to release me from all obligations
and waivers arising from any and all NON-NEGOTIATED agreements,
licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap,
confidentiality, non-disclosure, non-compete and acceptable use
policies (”BOGUS AGREEMENTS”) that I have entered into with your
employer, its partners, licensors, agents and assigns, in
perpetuity, without prejudice to my ongoing rights and privileges.
You further represent that you have the authority to release me
from any BOGUS AGREEMENTS on behalf of your employer.

More information about the testing-in-python mailing list