Comments (6)
You should be able to disable the plugin using pytest's -p no:rerunfailures
command line option.
from pytest-rerunfailures.
Hmm. That breaks if you also use --strict
(e.g. through pytest.ini
), but that's good enough for me. Thanks!
from pytest-rerunfailures.
I also encountered a similar problem with other plugins. If there is a flag like --rerun 3
in a pytest.ini
or in a tox.ini
then I found no way to switch off the plugin. -p no:rerunfailures
will cause the following error py.test: error: unrecognized arguments: --rerun
. Has there been a solution for other plugins to cope with that?
from pytest-rerunfailures.
I've had the same issue before as well... Is there something we could add for this scenario from the pytest side?
I guess there could be a -p ignore:rerunfailures
or so which runs pytest_addoption
(to add the commandline switches) but no other hooks. Then again depending what kind of stuff plugins do there (or at import time) this might lead to weird effects... So maybe this is better solved individually per-plugin indeed.
from pytest-rerunfailures.
IMO, it's a non-issue that disabling a plugin also disables it's command line options. That'd be expected, and changing it would just make it more confusing. Instead, don't use plugin options in your ini files if you're also going to need to disable them at a later date.
from pytest-rerunfailures.
I agree that -p no:rerunfailures
should be sufficient. Disabling reruns should not occur on a daily basis, rather to check if a global bugfix squished most of the brittle test failures. Removing the rerun option from a single INI
file to avoid unrecognized arguments
sounds good to me.
from pytest-rerunfailures.
Related Issues (20)
- Rerun all tests if any test fails
- For "only_rerun" allow access exception attributes HOT 1
- Can you identify if a particular is a re-run or not? HOT 3
- ENH: New option to rerun failures with the exception/inclusion of a path HOT 2
- Session and class scope fixtures won't teardown when specifying only_rerun or rerun_except HOT 1
- Tests are terminating with internal error HOT 7
- ImportError: cannot import name ‘resultlog_key‘ from ‘_pytest.resultlog‘
- pytest_runtest_logreport does not report "teardown" when using pytest-rerunfailures HOT 4
- AttributeError: 'list' object has no attribute 'items' in `_pytest.runner.SetupState.setup` HOT 4
- AttributeError: 'str' object has no attribute 'reprcrash' while using pytest.mark.xfail HOT 4
- Teardown of fixture with scope=class is not called if following test passes only after rerun or fails after rerun HOT 4
- `pytest-rerunfailures` slows down `pytest-xdist` testing HOT 3
- pytest_handlecrashitem faults with NotImplementedError when using the loadgroup test distribution algorithm HOT 1
- [RFC] `--pdb`: Friendlier default (use warning and infer `--reruns 0`)
- [RFC] `--reruns-on-exitfirst`: set reruns with `--exitfirst` / `-x`
- unify various linters with Ruff HOT 1
- only_rerun with exception raised from fixture teardown reruns test but report previous runs as failure
- set reruns does not work HOT 5
- Tests fail against pytest >= 8.2 HOT 6
- Test class instance is not recreated when retrying tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytest-rerunfailures.