[IPython-dev] Running the test suite

Konrad Hinsen konrad.hinsen at fastmail.net
Tue Feb 11 05:40:13 EST 2014

My latest PR gets lots of test failures, so I am finally looking
seriously at running the IPython test suite locally on my machine.

Details: IPython master branch, Python 2.7/3.3, "installed" with
'python setup.py develop'. MacOS X 10.9.

1) The obvious approach:
   All tests fail for the same reason:
     ImportError: cannot import name globalipapp

globalipapp is a module under IPython/testing, so this looks like some
issue with sys.path. Until now, I just decided to write my own little
test scripts for my own modifications, which seemed like less effort
than debugging the test system. But my own test scripts pass, whereas
the official test suite fails, so I need to figure out how to run the
official test suite.

2) Try running subsets:

   iptest config ...
     Same problem as under 1)

   iptest -v IPython.utils  (copy-paste straight from the Wiki!)
     iptest: error: unrecognized arguments: -v

3) Run IPython/testing/ipython.py as  script:

   python IPython/testing/iptest.py config
     Works fine, but it's a pain to run all parts individually. Moreover,
     the parts I know (what iptest lists) all pass, so there must be
     some other parts that I don't know about.

   python IPython/testing/iptest.py
     Fails because iptest.py accesses sys.argv[1]

At this point I am willing to give up - would someone please tell me what the
solution is?

Thanks in advance,

More information about the IPython-dev mailing list