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

Working Skip support #3

Merged
merged 3 commits into from
Dec 15, 2012
Merged

Working Skip support #3

merged 3 commits into from
Dec 15, 2012

Conversation

embray
Copy link
Contributor

@embray embray commented Dec 13, 2012

Unfortunately the display of skipped tests was not working for me with recent versions of nose. I can go into the details, but what it comes down to is that the way the SkipPlugin works, as a subclass of ErrorClassPlugins, it consumes skipped tests such that no other plugin can even know they ever existed--the addSkip method is never called either.

There are several ways to work around this, but the simplest I can think of is to simply disable the skip plugin and handle SkipTest exceptions directly in this plugin.

This also adds a total of how many tests were skipped, and a bar to the results. The Example notebook is updated to demonstrate the new capability.

I also have a branch at https://github.com/iguananaut/ipython_nose/tree/css-tweaks that was branched off from this change which adds some prettier (IMO) result bars. But I'll defer that until and unless this PR is accepted; otherwise I can tweak it to not depend explicitly on this PR.

… disabling the built-in skip plugin due to a long-standing defect with the ErrorClassPlugin-based implementation of the skip plugin, that once a test is handled as 'skipped' by the plugin, no other plugin can easily ascertain that a test was skipped. The addSkip method is never called, for example. The easiest workaround is to disable the skip plugin and handle SkipTest exceptions ourselves in addError. A more comprehensive method might be to reimplement the skip test plugin ourselves but it doesn't seem necessary.
@eloraburns
Copy link
Owner

This looks awesome! I was wondering where the skiptests went. :/

I'll try to give it a poke and merge it in in the next day or two. Thanks!

@embray
Copy link
Contributor Author

embray commented Dec 14, 2012

Oh I should have added, here's a sample of how the new CSS works in my other branch: http://nbviewer.ipython.org/urls/gist.github.com/raw/4281956/e1bc4f2b74b683a2766e791402fda645b076ec62/nb-nose-example.ipynb

@eloraburns eloraburns merged commit d14e811 into eloraburns:master Dec 15, 2012
@eloraburns
Copy link
Owner

Looks great, and I love the new CSS look. Thanks!

@embray
Copy link
Contributor Author

embray commented Dec 17, 2012

Great, thanks. I think this an important project so I'll see what I can do if anything else comes up.

@eloraburns
Copy link
Owner

Yup, there'll be a chunk of work coming up with respect to ipython/ipython#2518 . At some point I'll also submit the thing wholesale to ipython so it comes with the stock ipython install. :) (and that might require its own work, too)

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.

2 participants