Run a test suite one failing test at a time.
pytest-stepwise is a plugin for pytest that run all tests until a test fails, and then continue next test run from where the last run failed. You may think of it as a combination of the -x option, which exits the test run after a failing test, and the --lf option from pytest-cache, which only runs failing tests.
pytest-stepwise depends on pytest-cache, which will be installed by pip.
How to use it?
- Run py.test --stepwise.
- Watch the test fail and fix it.
- Again, run py.test --stepwise. The test suite will continue to run from right where it was.