Sort tests by their last duration, slowest first
Project description
Sort tests by their last duration, slowest first.
This pytest plugin was generated with Cookiecutter along with @hackebrot’s cookiecutter-pytest-plugin template.
Features
Sort tests on consecutive runs by their last duration, slowest first.
Works with pytest-xdist by pre-assigning tests to workers based on their last duration.
Requirements
pytest
pytest-xdist (optional)
Installation
You can install “pytest-slowest-first” via pip from PyPI:
$ pip install pytest-slowest-first
Usage
For best results, use this plugin with pytest-xdist to run tests in parallel. When used together, make sure to pass --dist=loadscope to pytest to ensure that tests are distributed evenly across workers.
Example command line:
$ pytest --sf -n auto --dist=loadscope
Contributing
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
License
Distributed under the terms of the MIT license, “pytest-slowest-first” is free and open source software
Issues
If you encounter any problems, please file an issue along with a detailed description.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pytest-slowest-first-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a90923fca120dc86f8c0f3b4a31e6a6cdea6526a649b7f73ca1bd005c86f70f |
|
MD5 | 7820fb92322b09ed6a047392f5efbf0f |
|
BLAKE2b-256 | ca79b7d4cfe2fdc923ee43a41ce1f0009a537f70bdd0ed4f333345b9170fa9cf |
Hashes for pytest_slowest_first-0.1.0-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 441adb8d8386717f8e3e10802b9ec7c3250fb023fcbd7d4b0d7ebc0f45f82131 |
|
MD5 | a1038a74d92432e6c34ef828e0a25f74 |
|
BLAKE2b-256 | 28b6d97b158a691b69c2175c71c648957179ca5943dbca995e8b488af633fd70 |