Skip to main content

Tools for sorting test cases

Project description

Homepage python>=3.10 PyPI - Version PyPI - Downloads PyPI - License

Code Coverage Mutation Coverage Documentation

Imports: isort Code Style: black Linter: ruff Snyk Security

Pytest-Sort

This pytest plugin is used to help identify application state leaks in your test suite. It does this by automatically changing the execution order of test cases.

How frustrating is it to have a test case that works fine when runs by itself, but fails when run with the rest of the suite? By running tests in a random order, the culprit of such problems can be identified much earlier in the development process. Alternately, running in ordered and reverse order can help find the cause of the problem in existing test suites.

Features

  • Multiple sort options including: Random, Fastest, Reverse, and more.
  • Group test cases into buckets that are each sorted separately.
  • Control sort order of the buckets.
  • Use Pytest markers to always run specific test cases in order.

Quick Start

Installation:

pip install pytest-sort --upgrade

Running with pytest-sort:

pytest --sort-mode=random

Documentation:

Contribute

Support

If you are having issues, please let us know.

I can be contacted at: pbuschmail-pytestsort@yahoo.com

Or by opening an issue: https://github.com/WiredNerd/pytest-sort/issues

License

The project is licensed under the MIT license.

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_sort-1.3.3.tar.gz (26.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_sort-1.3.3-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file pytest_sort-1.3.3.tar.gz.

File metadata

  • Download URL: pytest_sort-1.3.3.tar.gz
  • Upload date:
  • Size: 26.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pytest_sort-1.3.3.tar.gz
Algorithm Hash digest
SHA256 782cdcc0dca7a52dd3ca28d90e110cfc6b4d54a3d0dc767c55588cc7efbabdf3
MD5 a366a6dd0078dfe3827e5a5a1c7f8223
BLAKE2b-256 429f4e07dae01d5b8d2f13ca59d4fd0007e3ae586ff19b4e1a25e8dc60089f8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_sort-1.3.3.tar.gz:

Publisher: python-publish.yml on WiredNerd/pytest-sort

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pytest_sort-1.3.3-py3-none-any.whl.

File metadata

  • Download URL: pytest_sort-1.3.3-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pytest_sort-1.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 03b51ad46515d7e33d9c5a4039b99e69be25e9c8f810dbda8caf3555373c7644
MD5 17a11ed32a4f3085f7acb53a99396772
BLAKE2b-256 3acfd2aec7a764384d1d052275112c6b17d395c0db807c77c354d5be9ee2f515

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_sort-1.3.3-py3-none-any.whl:

Publisher: python-publish.yml on WiredNerd/pytest-sort

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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