You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve the ``--stepwise``/``--sw`` flag to not forget the last failed test in case pytest is executed later without the flag.
1
+
The ``--stepwise`` mode received a number of improvements:
2
2
3
-
This enables the following workflow:
3
+
* It no longer forgets the last failed test in case pytest is executed later without the flag.
4
4
5
-
1. Execute pytest with ``--stepwise``, pytest then stops at the first failing test;
6
-
2. Iteratively update the code and run the test in isolation, without the ``--stepwise`` flag (for example in an IDE), until it is fixed.
7
-
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.
5
+
This enables the following workflow:
8
6
9
-
Previously, at step 3, pytest would start from the beginning, forgetting the previously failed test.
7
+
1. Execute pytest with ``--stepwise``, pytest then stops at the first failing test;
8
+
2. Iteratively update the code and run the test in isolation, without the ``--stepwise`` flag (for example in an IDE), until it is fixed.
9
+
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.
10
10
11
-
Also added the new ``--stepwise-reset``/``--sw-reset``, allowing the user to explicitly reset the stepwise state and restart the workflow from the beginning.
11
+
Previously, at step 3, pytest would start from the beginning, forgetting the previously failed test.
12
+
13
+
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).
14
+
15
+
* New ``--stepwise-reset``/``--sw-reset`` flag, allowing the user to explicitly reset the stepwise state and restart the workflow from the beginning.
0 commit comments