box / flaky

Plugin for nose or pytest that automatically reruns flaky tests.
Apache License 2.0
377 stars 60 forks source link

pytest: max_runs option being ignored #210

Closed rogeriochaves closed 4 months ago

rogeriochaves commented 4 months ago

hello there 👋

when using this with pytest:

@pytest.mark.flaky(max_runs=3)
def test_example():
    print("Running test_example")
    assert False

no matter what number I put on max_runs, it only ever retries once:

=============================================================================== short test summary info ===============================================================================
FAILED tests/test_simple_assertion.py::test_example - assert False
======================================================================= 1 failed, 34 warnings, 1 rerun in 2.15s =======================================================================
rogeriochaves commented 4 months ago

wait, nevermind, for some reason pytest-rerunfailures was also installed a poetry didn't remove it, it actually works as expected, sorry!