Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iptest refactoring #4180

Merged
merged 19 commits into from Sep 19, 2013
Merged

Iptest refactoring #4180

merged 19 commits into from Sep 19, 2013

Conversation

takluyver
Copy link
Member

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.

@takluyver
Copy link
Member Author

  • Ensure that we can still run more specific parts of the test suite.

@minrk
Copy link
Member

minrk commented Sep 6, 2013

I presume IPTestApp should be a BaseIPythonApplication subclass, consistent with the rest of IPython.

@ellisonbg
Copy link
Member

Cool, I am excited to have a look at this. @ivanov have you talked to @takluyver about how we are going to build the JS/casper/phantom tests into this architecture. It is almost like we need a more general abstraction of a test seciton - one that is not run by nose.

@ellisonbg
Copy link
Member

It would be good to look at what the needed abstractions are for that. Do you think you could look into that and post back on this PR?

@takluyver
Copy link
Member Author

IPTestController is fairly general - it should be easy to split it into a couple of subclasses for running different kinds of tests.

@takluyver
Copy link
Member Author

I've refactored it so there's a TestController base class and a PyTestController subclass. When we've got JS tests, we should be able to make another subclass which runs the JS tests.

@takluyver
Copy link
Member Author

There's a problem with a debugger doctest printing different output when iptest runs in a subprocess versus being run directly, which I'm working on debugging.

@takluyver
Copy link
Member Author

Found and worked around the doctest issue, details in commit message.

@ivanov
Copy link
Member

ivanov commented Sep 11, 2013

i've got a bunch of feedback here, just working on it locally today for now. Once I have all my ducks lined up in a row and figure out what modifications make sense, I'll make a PR against this branch

@takluyver
Copy link
Member Author

It's now also possible to run more than one section together, e.g. iptest core lib utils.

I should also have mentioned before, this allows iptest core instead of iptest IPython.core. The latter still works, in case we're too used to typing that.

@ivanov
Copy link
Member

ivanov commented Sep 19, 2013

sweet, thanks for accommodating the changes from the peanut (butter pretzel puffs) gallery. looks great now, being able to run multiple test groups in parallel will also come in handy. merging.

ivanov added a commit that referenced this pull request Sep 19, 2013
@ivanov ivanov merged commit 2b69cef into ipython:master Sep 19, 2013
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants