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.0.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file pytest-sort-1.3.0.tar.gz.

File metadata

  • Download URL: pytest-sort-1.3.0.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for pytest-sort-1.3.0.tar.gz
Algorithm Hash digest
SHA256 36364f94842e66454330938c087a3e3a04fe52a5cd5f24d52c156e73e091541f
MD5 2712d214fd4d42c02d19935a5da5836a
BLAKE2b-256 76a39b4b59a4562251ca8aeee12a72681ed847a226bda35ac053dd9441e6f381

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pytest_sort-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b8916cee8d8d5c15b76a44303965b1cfdf7458d95341dd41acbe99c433b8fb24
MD5 4ed42e49c1a0031544d11f96906e3576
BLAKE2b-256 44551b59f19417451d4c218b3eff45a9ef1824ad0771d8d24cacb6765ac8f240

See more details on using hashes here.

Supported by

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