[IPython-dev] Testing headaches

Prabhu Ramachandran prabhu at aero.iitb.ac.in
Thu Apr 16 02:29:11 EDT 2009


On 04/16/09 03:45, Brian Granger wrote:
> Yes, this is the type of thing that I am actually starting to think about:
> 
> * Have a top level test runner that looks at a subpackage (how?) to
> see its deps.
> * The top level test runner tests the deps.
> * If the deps are there, it runs the tests of the subpackage in a
> ***separate process***
> * Iterate though all IPython subpackages.  Or we could make it interactive.
> 
> This approach would better isolate the testing of different package.
> I think having things run in different processes is really important
> due to all the nasty stuff we are seeing.

Let me just add that I've been bitten enough by the 
run-all-tests-in-one-go approach that all test runners take (nosetests 
especially) that I "lost it" on one of the threads on enthought-dev and 
ranted like crazy.  It does help to be able to run each test file in a 
separate process so different pieces don't stomp on each other.  It also 
mimics what we usually do when developing -- testing the particular test 
file and once its done run the full suite.  It makes it much easier to 
isolate issues and not have to worry about unpredictable and 
hard-to-debug side effects.  Robert Kern pointed out that nosepipe lets 
you run each test case in a separate process.

  http://pypi.python.org/pypi/nosepipe/

This also opens up the possibility of doing parallel testing on multiple 
cores.

cheers,
prabhu



More information about the IPython-dev mailing list