Skip to content

Fix squashed results when using rerunfailures (fixes #735) #736

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

Merged
merged 3 commits into from
Mar 14, 2023

Conversation

delatrie
Copy link
Contributor

Context

This PR fixes the regression when pytest-rerunfailures is used. The issue started to occur after the closing of a test result was moved from pytest_runtest_logfinish to pytest_runtest_protocol to prevent the test result from being omitted from the output under certain conditions (e.g., if pytest.exit was called during fixture setup).

To fix that, I put the closing of a test result back to pytest_runtest_logfinish while still backing it up with pytest_runtest_protocol in case pytest_runtest_logfinish is not called. These two closings should cover both issues.

Fixes #735.

Checklist

@delatrie delatrie added bug Something isn't working theme:pytest labels Mar 13, 2023
@delatrie delatrie requested a review from skhomuti March 13, 2023 17:19
@delatrie delatrie self-assigned this Mar 13, 2023
@delatrie delatrie merged commit 12085cd into master Mar 14, 2023
@delatrie delatrie deleted the issue735-fix branch March 14, 2023 12:57
beckerGil pushed a commit to beckerGil/allure-python that referenced this pull request Apr 10, 2023
IvanBuruyane pushed a commit to IvanBuruyane/allure-python that referenced this pull request Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working theme:pytest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicated test case statuses reported with pytest-rerunfailures, retries section is empty
2 participants