Skip to main content

Tools for sorting test cases

Project description

Homepage python>=3.8 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.2.tar.gz (25.9 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pytest_sort-1.3.2.tar.gz
Algorithm Hash digest
SHA256 f0bdf3fcea8eb06f7d12fdc7eaf859cbb8a49eafe0f5e0edceeaf2f9be1357db
MD5 de5d9ca4b044a812cb9ff6590ccd63b8
BLAKE2b-256 44fc2fc6ebb147a59791d734d2a4fbafcf97b1797d1856b555d60a82f7e46911

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_sort-1.3.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: pytest_sort-1.3.2-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.12.9

File hashes

Hashes for pytest_sort-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7644173c193f8bb587a6514326ea5ed635cab8587fd409c3f5693bda6a910fad
MD5 3aa772f76138538a48cdec75430271e5
BLAKE2b-256 c2a1e96fb5fd594e016f1e2a6cea47c9533f6297cd882873d182bbda4fd7b269

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_sort-1.3.2-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 Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page