[IPython-dev] stdout when running the test suite

MinRK benjaminrk at gmail.com
Sun Apr 24 16:26:00 EDT 2011

This has been true for a *long* time - at least January 2010.  I did
some checking, and it turns out that it's actually related to io.Term,
so I pushed a fix to PR #397, since that's regarding the same code.

The Term object created with the InteractiveShell latches onto
sys.stdout before nose redirects it (which happens in every test), so
anything printed there would still arrive at stdout.  I've fixed this
in the tests, by creating simple StreamProxy objects that are soft
links to sys.stdout/err, rather than hard ones, so the Capture plugin
should still work with IPython output.


On Sun, Apr 24, 2011 at 10:20, Thomas Kluyver <takowl at gmail.com> wrote:
> On 23 April 2011 23:15, Brian Granger <ellisonbg at gmail.com> wrote:
>> I am running the test suite a lot today as I code I am getting a lot
>> of things dumped to stdout or stderr from the tests suite.
> I've seen those since I started running the test suite. Specifically in the
> IPython.core tests. I'd assumed they were just some side effect that wasn't
> concerning us.
> I think IPython replaces sys.stdout, so I've seen code for the test suite
> that overrides that (in testing/globalipapp). I wonder if this interferes
> somehow with nose, which must also be redirecting stdout.
> Thomas
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

More information about the IPython-dev mailing list