-
Notifications
You must be signed in to change notification settings - Fork 84
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 tests reported as failures when rerun happened due to exception raised from fixture teardown when using only_rerun #262
base: master
Are you sure you want to change the base?
Conversation
@shlompy Thank you for your PR. Currently many tests break. Could you please have a look what's causing this? |
…aised from fixture teardown when using only_rerun
Thanks @icemac I hope I have not misunderstood. Now with my bug fix the outcome is indeed 1 pass and 2 reruns, so I've updated the test assertion to match that. But I don't see the test git actions being triggered again after my last push |
Thanks for the review request, but I'll stick to general CI/maintenance things for this library and leave the internals to others 👍 |
resolved conflicts |
gentle reminder, can this fix please be reviewed? |
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.
It is not clear why the test breaks, it looks like a smell.
I'd like to see a test like you had in the issue failing without the changes and succeeding with them.
@@ -472,7 +472,7 @@ def pytest_runtest_teardown(item): | |||
assert item.execution_count == 3""" | |||
) | |||
result = testdir.runpytest("--reruns", "2") | |||
assert_outcomes(result, passed=3, rerun=2) | |||
assert_outcomes(result, passed=1, rerun=2) |
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.
The test name says that execution_count
is exposed to the test runner. So it should be 3
passed tests, as this is set during tear down.
I do not know why this behaviour is here and why it breaks now.
Fixes #261