pytest-rerunfailures
pytest-rerunfailures copied to clipboard
a pytest plugin that re-runs failed tests up to -n times to eliminate flakey failures
Since upgrading to `pytest>=7.0.0`, the `self` parameter between test runs remain the same when retrying a single test function within a test class. When using `pytest==6.5.2` (with earlier compatible `pytest-rerunfailures`...
See https://github.com/pytest-dev/pytest-rerunfailures/actions/runs/8409152908/job/23026172136 This ~~can be a temporary problem or a~~ is a hint that we have to change something here to make it compatible again.
I've already set `--rerun 1`, bug it does not work ``` pytest args: ['-n', '7', '--reruns', '1', '--dist', 'loadscope', 'test/xxxx/test_case/xxxxxx', '--alluredir', 'allure_report/xml', '--junitxml=output/result.xml'] class TestDebugRerun: def test_debug_rerun(self): logging.info("post request") assert...
Fixes https://github.com/pytest-dev/pytest-rerunfailures/issues/261
Hi. I have a need to do some checks in a fixture teardown to determine whether a test should rerun or not. Because rerunfailures only allows filtering based on exception,...
Assume `pyproject.toml`: ```toml [tool.pytest.ini_options] addopts = "--reruns 2" ``` # Current behavior Right now, passing `--exitfirst` / `-x` will rerun twice. # Better: `--reruns-on-exitfirst 0` This way, the user can...
Assume `pyproject.toml`: ```toml [tool.pytest.ini_options] addopts = "--reruns 2" ``` # Current behavior Right now, passing `--pdb` will raise: ``` ERROR: --reruns incompatible with --pdb ``` # Better: Assume `--reruns 0`...
I'm using xdist with the --dist loadgroup command line option and the reruns are not working for crashed nodes because xdist's LoadScopeScheduling.mark_test_pending for throws a NotImplementedError error @ https://github.com/pytest-dev/pytest-xdist/blob/master/src/xdist/scheduler/loadscope.py#L244 [gw2]...
`pytest-rerunfailures` is not compatible with the [pytest-timeout](https://github.com/pytest-dev/pytest-timeout/) plugin. Probably b/c the same pytest hooks are used. The first time, the timeout is observed, but when the test case re-runs, there's...
I tried to run tests for `pytest-xdist` with `pytest-rerunfailures` installed and disabled using `-p no:rerunfailures` set in `PYTEST_ADDOPTS` environment variable. I noticed that with this setup the `pytest-xdist` tests takes...