Skip to main content

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.

Metadata

Release files for pytest-sort 1.3.3

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-sort 1.3.3
File Size Uploaded
pytest_sort-1.3.3.tar.gz 26.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-sort 1.3.3
File Interpreter ABI Platform
pytest_sort-1.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 40.0 kB

Release files / pytest_sort-1.3.3.tar.gz

Download URL pytest_sort-1.3.3.tar.gz
Size 26.2 kB
Tags Source
SHA-256 checksum
How to use checksums
782cdcc0dca7a52dd3ca28d90e110cfc6b4d54a3d0dc767c55588cc7efbabdf3
BLAKE2b-256 checksum
How to use checksums
429f4e07dae01d5b8d2f13ca59d4fd0007e3ae586ff19b4e1a25e8dc60089f8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 4, 2026.

Transparency log

Release files / pytest_sort-1.3.3-py3-none-any.whl

Download URL pytest_sort-1.3.3-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03b51ad46515d7e33d9c5a4039b99e69be25e9c8f810dbda8caf3555373c7644
BLAKE2b-256 checksum
How to use checksums
3acfd2aec7a764384d1d052275112c6b17d395c0db807c77c354d5be9ee2f515
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.3.3 This release

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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