-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve stepwise to not forget failed tests
Now `--stepwise` will remember the last failed test, even if the previous pytest invocations did not pass `--stepwise`. Previously it would always clear the cache if not active, which hinders certain interactive workflows, which is the prime use cases for the flag.
- Loading branch information
1 parent
2931fdb
commit b261556
Showing
3 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Improve the ``--stepwise`` flag to not forget the last failed test in case pytest is executed later without the flag. | ||
|
||
This enables the following workflow: | ||
|
||
1. Execute pytest with ``--stepwise``, pytest then stops at the first failing test; | ||
2. User iteratively updates the code and runs the test in isolation, without the ``--stepwise`` flag | ||
(for example in an IDE), until it is fixed. | ||
3. At this point, the user can execute pytest with ``--stepwise`` again and pytest will continue from the previously | ||
failed test, and if it passes, continue with the next tests. | ||
|
||
Previously, at step 3, pytest would start from the beginning, forgetting the failed tests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters