ipython/ipython — pull request #4180 by takluyver (2013-09-06 18:42:58+00:00)
Title: Iptest refactoring

This refactors iptest to bring it a bit more up to date. There's probably more work that can be done, but I think this is a good point to do a first PR on it.

The main changes:

- The machinery to run a testing subprocess has been split out into iptestcontroller and rationalised. Now you create an IPTestController instance, set up its command line arguments, Python code and environment variables, and then launch it.
- Command line parsing is now done by argparse, rather than lots of `if '--with-xunit' in argv:`. This makes it easier to add more options later, and also gives us simple ways to get combined coverage reports (and we should later be able to get coverage from subprocesses, but that's a question for another PR).
- Instead of a list of test groups and a list of exclusions, we now have a list of TestSection instances, each of which has inclusions and exclusions, as well as a list of requirements. This allows us to exclude tests from one section but include them in another (e.g. autoreload, kernel.inprocess) in a clean way. I've rearranged the specification of dependencies and exclusions to group them by section.
- Exclusions are now handled by a separate nose plugin (`ExclusionsPlugin`) rather than being an exciting side-effect of our ipdoctest plugin.