[TIP] nose's annoying output capture
Chris Withers
chris at simplistix.co.uk
Sun Oct 16 05:22:20 PDT 2011
On 16/10/2011 09:55, Robert Collins wrote:
> On Sun, Oct 16, 2011 at 1:08 AM, meme dough<memedough at gmail.com> wrote:
>> Both py.test and nose (and presumably unit2) collect stdout / stderr
>> and so hide it by default. Why is this annoying? You see the output
>> if a test fails.
>
> It interferes with debugging, both adhoc and pdb. Its unnecessary
> complexity, and it -totally- fails in parallel test (via threads)
> environments.
Yeah, not mention that code that writes to stdout or stderr often fails
in production (things like mod_wsgi, etc, don't like you writing
directly to streams).
> All in all its a terrible idea. Tests that need to capture
> stdout/stderr can easily do so.
http://packages.python.org/testfixtures/streams.html
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
More information about the testing-in-python
mailing list