Skip to main content

pytest-slowest-first

PyPI version Python versions See Build Status on AppVeyor

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=loadgroup to pytest to ensure that tests are distributed evenly across workers.

Example command line:

$ pytest --sf -n auto --dist=loadgroup

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.

Metadata

Release files for pytest-slowest-first 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-slowest-first 0.1.2
File Size Uploaded Provenance
pytest-slowest-first-0.1.2.tar.gz 4.4 kB Without provenance Details

Release files / pytest-slowest-first-0.1.2.tar.gz

Download URL pytest-slowest-first-0.1.2.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
331aa532b48f85cf2041ac6d79a8d4382bab44395f3079ff01b0f97e4f9d056b
BLAKE2b-256 checksum
How to use checksums
c005d0c97b4f2fa7814d4c6dc4db8049de83cbaa1a28333edd512243df5a46e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Security for pytest-slowest-first 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page