-
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
[BUG] --reruns breaks yielded fixture #274
Labels
Comments
Like mentioned in #272 (comment) this seems to be related to the pytest version. pytest --log-cli-level=INFO --reruns 2 tests.py
======================================================== test session starts ========================================================
platform linux -- Python 3.11.2, pytest-8.1.2, pluggy-1.5.0
rootdir: /tmp
plugins: rerunfailures-14.0
collected 1 item
tests.py::test_dummy
---------------------------------------------------------- live log setup -----------------------------------------------------------
ERROR root:tests.py:6 ################ Pre ################
RERUN [100%]
tests.py::test_dummy RERUN [100%]
tests.py::test_dummy
--------------------------------------------------------- live log teardown ---------------------------------------------------------
ERROR root:tests.py:8 ################ Post ################
FAILED [100%]
============================================================= FAILURES ==============================================================
____________________________________________________________ test_dummy _____________________________________________________________
def test_dummy():
> assert 1 == 0
E assert 1 == 0
tests.py:12: AssertionError
-------------------------------------------------------- Captured log setup ---------------------------------------------------------
ERROR root:tests.py:6 ################ Pre ################
------------------------------------------------------- Captured log teardown -------------------------------------------------------
ERROR root:tests.py:8 ################ Post ################
====================================================== short test summary info ======================================================
FAILED tests.py::test_dummy - assert 1 == 0
==================================================== 1 failed, 2 rerun in 0.08s ===================================================== |
Currently pytest >= 8.2 is not supported, see #267, so I am going to close this issue as invalid in favour of that one. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a session scoped fixture which should be run before and after the test session:
This usually shows the following log:
How ever, if I use the
--reruns
parameter, the 2nd part (after the yield) does not get executed (################ Post ################
never gets called):The text was updated successfully, but these errors were encountered: