-
-
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.
Show cache information and reset cache if test count changes
- Loading branch information
1 parent
c27768b
commit 3ce0a33
Showing
3 changed files
with
231 additions
and
45 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 |
---|---|---|
@@ -1,11 +1,15 @@ | ||
Improve the ``--stepwise``/``--sw`` flag to not forget the last failed test in case pytest is executed later without the flag. | ||
The ``--stepwise`` mode received a number of improvements: | ||
|
||
This enables the following workflow: | ||
* It no longer forgets the last failed test in case pytest is executed later without the flag. | ||
|
||
1. Execute pytest with ``--stepwise``, pytest then stops at the first failing test; | ||
2. Iteratively update the code and run the test in isolation, without the ``--stepwise`` flag (for example in an IDE), until it is fixed. | ||
3. Execute pytest with ``--stepwise`` again and pytest will continue from the previously failed test, and if it passes, continue on to the next tests. | ||
This enables the following workflow: | ||
|
||
Previously, at step 3, pytest would start from the beginning, forgetting the previously failed test. | ||
1. Execute pytest with ``--stepwise``, pytest then stops at the first failing test; | ||
2. Iteratively update the code and run the test in isolation, without the ``--stepwise`` flag (for example in an IDE), until it is fixed. | ||
3. Execute pytest with ``--stepwise`` again and pytest will continue from the previously failed test, and if it passes, continue on to the next tests. | ||
|
||
Also added the new ``--stepwise-reset``/``--sw-reset``, allowing the user to explicitly reset the stepwise state and restart the workflow from the beginning. | ||
Previously, at step 3, pytest would start from the beginning, forgetting the previously failed test. | ||
|
||
This change however might cause issues if the ``--stepwise`` mode is used far apart in time, as the state might get stale, so the internal state will be reset automatically in case the test suite changes (for now only the number of tests are considered for this, we might change/improve this on the future). | ||
|
||
* New ``--stepwise-reset``/``--sw-reset`` flag, allowing the user to explicitly reset the stepwise state and restart the workflow from the beginning. |
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
Oops, something went wrong.