Fix tests reported as failures when rerun happened due to exception raised from fixture teardown when using only_rerun#262
Fix tests reported as failures when rerun happened due to exception raised from fixture teardown when using only_rerun#262shlompy wants to merge 6 commits intopytest-dev:masterfrom
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? |
icemac
left a comment
There was a problem hiding this comment.
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.
| ) | ||
| 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.
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