-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fix self.instance._outcome
is None
case in #173
#174
Conversation
Thanks @ydshieh! Can you include a test that fails without this patch to ensure we do not regress this in the future by accident? A separate unittest using the reproducer you posted in the issue is enough. |
for more information, see https://pre-commit.ci
tests/test_subtests.py
Outdated
@@ -336,6 +336,32 @@ def test_foo(self): | |||
["collected 1 item", "* 3 xfailed, 1 passed in *"] | |||
) | |||
|
|||
# A test for https://github.com/pytest-dev/pytest-subtests/issues/173 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only with pytest case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add a CHANGELOG entry?
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
…btests into fix_none_issue
Let me know if this commit works :-) |
The issue we encountered was covered here: pytest-dev/pytest-subtests#173 And is resolved with the latest changes from this PR: pytest-dev/pytest-subtests#174, and is published in the latest version 0.14.1.
Fix #173.
When a test is decorated with
unittest.skip
,self.instance._outcome
would beNone
and we need to take this into account.