Skip to main content

Run tests in order of execution time (faster tests first)

Project description

PyPI version Python versions

Run tests in order of execution time (faster tests first)

Usage

From terminal:

$ pytest --slow-last

Or in pytest.ini:

[pytest]
addopts = --slow-last

Installation

You can install “pytest-slow-last” via pip from PyPI:

$ pip install pytest-slow-last

Features

  • Allows to run tests in order of the execution time of the last run (faster tests first, new tests even before).

  • -ff option has preference: if a test fails, it will be run first.

  • By default, test durations are rounded to the 2nd decimal digit: this way, tests which are “more or less of the same speed” are kept in the original order. Use –slow-last-rounding to change that, and set it to -1 to disable.

Requirements

  • Python >= 3.5

  • pytest >= 3.5

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-slow-last” is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.


This pytest plugin was generated with Cookiecutter along with @hackebrot’s cookiecutter-pytest-plugin template.

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

pytest_slow_last-0.2.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

pytest_slow_last-0.2.1-py2.py3-none-any.whl (4.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pytest_slow_last-0.2.1.tar.gz.

File metadata

  • Download URL: pytest_slow_last-0.2.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.6

File hashes

Hashes for pytest_slow_last-0.2.1.tar.gz
Algorithm Hash digest
SHA256 319d213afaefc47aa9c3478600b2a2234116c8963a43e857e646e2a599fcff8d
MD5 75eb8bebbb5ff8837edfe391d607815d
BLAKE2b-256 405dc51f0da872b703e671eaf24550006e29e686e9ecfbf06c565f54658bd194

See more details on using hashes here.

File details

Details for the file pytest_slow_last-0.2.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_slow_last-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6414effee05da5f59c1c7b6ddaf6a9f2f4c1d9381745c7d047456c378239d5fe
MD5 8ee288e9263586e40f4e5e3caecf6f70
BLAKE2b-256 a43bb30d511f9e0920f04ffa305d52c5a81d679dd3aa803bca54fa6cb57fb806

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page