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.
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
topytest_runtest_protocol
to prevent the test result from being omitted from the output under certain conditions (e.g., ifpytest.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 withpytest_runtest_protocol
in casepytest_runtest_logfinish
is not called. These two closings should cover both issues.Fixes #735.
Checklist