[TIP] unittest2/nose2: plugin interaction or overrides or ... ?
fuzzyman at voidspace.org.uk
Fri Sep 3 16:41:26 PDT 2010
On 03/09/2010 14:26, jason pellerin wrote:
>> The testsFromGenerator function takes an unpack argument. Both Functions and
>> Generators have an unpack class attribute 'unpack' that is passed in. You
>> can override this in a subclass.
>> Let me know if you need any further changes or I screwed something up.
> Thanks! Backwards compatibility for generators and test function
> fixtures is now working nicely in nose2.
> My next topic will be how to handle output/logging capture and attach
> those buffers to test reports without monkeying with _exc_info_to_str,
> which I've learned from nose is harmful to small animals and other
> people who don't want buffer contents splattering into their output in
> inappropriate places. I'll work on it a bit (next week maybe) and come
> back with some more feature requests if needed.
Heh. Actually the junit-xml plugin has a similar issue. The current
'fix' for that (not in my repository) is that including stdout / stderr
in junit output is only supported if buffering is on and then the plugin
uses the (private) buffer attributes on the result. So not really good...
For logging capture, does the new reporting API not make it easy to
attach extra information to test failure reports?
Maybe it would be helpful to talk on IRC about it sometime.
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