Run a test suite one failing test at a time.
Project description
Introduction
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 as a dependency.
How to use it?
Install the plugin - pip install pytest-stepwise.
Run py.test --stepwise (you can also use the alias --sw).
Watch the test fail and fix it.
Run py.test --stepwise again. The test suite will continue to run right from where it was.
When is this useful?
pytest-stepwise was written for use when a large part of the test suite is failing. In this case, pytest-stepwise allows you to focus on fixing one test at the time instead of being overwhelmed by all failing tests. It should however be noted that all tests need to be re-run after to make sure that any changes made when fixing one test has not broken some other test.\
Please send me a tweet if you have any suggestions regarding the usefulness of pytest-stepwise.\
Changelog
0.1 - Initial version.
0.2 - Clear cache after test run when the plugin is not active. Added --skip option.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pytest-stepwise-0.2.tar.gz
.
File metadata
- Download URL: pytest-stepwise-0.2.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c5042aefd4bac168a38ac9872f62f96c7bf5a7a47ea865dfed924b6e33cf01f |
|
MD5 | 1b97320d53cfc89b1e45211b986062a7 |
|
BLAKE2b-256 | e16d4c6ce375eadc8b419fcb8c8c666a53b1ce598c2ed2de676bcf2f6e9a6241 |