[IPython-dev] Problems with "trial IPython.kernel" on trunk

Fernando Perez fperez.net at gmail.com
Tue Aug 4 19:18:38 EDT 2009

On Tue, Aug 4, 2009 at 12:57 PM, Brian Granger<ellisonbg.net at gmail.com> wrote:
>> Mmmh, can you point me to the changeset you made?
> Here it is:
> http://bazaar.launchpad.net/~ipython-dev/ipython/module-reorg/revision/1225
> * I fixed the problem in core.ultratb
> * I removed kernel/core/ultraTB
> * Fixed the remaining import statements that were using kernel/core/ultraTB
> to use core/ultratb
>> Also, is it clear to you why they were passing before?  We are running
>> trial in a *separate process*, so there's no way the parent's ipython
>> instance could be leaking into the trial process.
> Do you have something weird going on with your paths and versions of
> ipython, twisted, etc.  I almost wonder if when the test suite is run using
> iptest, it is picking up a different version of trial and ipython?  Then
> they would pass.

OK, I've understood the problem fully and fixed it basically by
applying manually your changes above, in appropriate form for the
current trunk.  I tried to do it in a way that will minimize the
chances of you getting a conflict when you merge, but forgive me if it
happens :)

The problem was that ipdoctest unconditionally starts an ipython
instance when imported.  I do this because I was never able to get it
to work right with nose if I delayed the start at all, so I punted and
did it this way.  But this means that if you run

trial IPython

the trial path search will cause this ipython instance to start up,
and later tests will find it, while if you run

trial IPython.kernel,

trial will only search below the kernel/ package and it will not
trigger ipdoctest (that lives under testing/).

Mystery solved :)

For now, applying your changes makes everything work fine, both with
the top-level suite and with any manner of running trial I could find.
 But since that unconditional ipython start is still a problem, I made
it a critical bug to me:


So this doesn't stay below the radar for long.

But I can run the test suite either from the top, or in any variation
of 'trial' that I can find, without problems.

I'm running out of available time now, and I think we've dug to the
bottom of this one pretty good, so I'm inching towards calling it
done.  I'm going to prep the release as-is, but will hold off on
sending out the email announcement in case anyone can spot any
last-second problems.

Thanks for all the help!



More information about the IPython-dev mailing list