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
Hashes for pytest-slowest-first-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f8ecc903b12a05c20d3ab0b5e0f01bf997190188f68e230143a23a2d5874c5a |
|
MD5 | 8957fc5f753a24013b0bf7112c72884d |
|
BLAKE2b-256 | 60096ebd8e0ab83b2b60bc280cb7cb2b241e217d0ac4490df0fedeb76858d46a |