-
Notifications
You must be signed in to change notification settings - Fork 132
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
SkipTest raised inside setupClass treated as error #373
Comments
Thanks for reporting. I assume this worked fine under 0.6.5? Maybe pin there for now. This functionality should get tested here: nose2/nose2/tests/functional/support/scenario/tests_in_package/pkg1/test/test_things.py Line 23 in 7928e01
(but with unittest not unittest2) |
Yes, with 0.6.5 it works fine. |
Able to reproduce on python version 2.7 |
Unsurprisingly, this is where the bug was introduced: |
I have more information. In 0.6.5, this type of construct did not properly skip the test if SkipTest from unittest was used. Running this snippet with different versions of nose2 demonstrates this behavior
Switching between unittest and unittest2 here https://github.com/nose-devs/nose2/blob/master/nose2/loader.py#L30 toggles that behavior. Haven't figured out why or best way to support both unittest.SkipTest and unittest2.SkipTest |
Ok my joke was wrong... Yeah. It looks like and interesting problem :(. |
virtualenv python version:
3.6.2
nose2 version:
0.7.2
unittest2 version:
1.1.0
snippet:
Expected behaviour: Test case is skipped
Actual behaviour: SkipTest is treated like actual error. See below:
The text was updated successfully, but these errors were encountered: