--last-failed and retest on success
See original GitHub issueI’d love some guidance on how to get pytest --last-failed
to play nice with ptw. Right now, if the last failed tests succeeds, then ptw sits patiently until the next file change.
What I’d like is for it to run normally with last-failed, but when all of the last-failed tests succeed, then rerun all tests. Any suggestions?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:7
Top Results From Across the Web
How to re-run failed tests and maintain state between test runs
The plugin provides two command line options to rerun failures from the last pytest invocation: --lf , --last-failed - to only re-run the...
Read more >How to Use and Improve on the Break and Retest Strategy
The Break and Retest strategy is one of the most popular strategies in the financial markets. Here's how it works and the risks...
Read more >7 pytest Features and Plugins That Will Save You Tons of Time
These pytest tips will make your life easier. Fail fast, stop after first failure, retry last failed, and fix flaky tests with pytest-rerunfailures....
Read more >TRADOC Regulation 350-6 Headquarters, United States Army ...
ends with the successful completion of MOS testing, demonstration of apprentice-level ... retest from progressing further in the course.
Read more >Trans 104.12 - Wisconsin Legislature
... some other significant circumstance has changed since the last failed test or exam, which makes successful completion of the test or exam...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The workaround I’ve been using is
ptw mymodule/ tests/ -- --failed-first --exitfirst
in order to quickly re-loop on failing tests, but run all the remaining tests. ( orptw mymodule tests -- --ff -x
for the code golfers)Perfect, thanks for clarifying.
For comparison,
--looponfail
would do:Then you try to fix [B], but don’t succeed. The next run is:
Then you fix B. The next run is:
…each run runs all the still-failing tests, until they’re all fixed