Skip to main content

Tools for sorting test cases

Project description

python>=3.8 PyPI - Downloads PyPI - License PyPI - Version

Code Coverage Mutation Coverage

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

Project description

pytest-sort is a pytest plugin to automatically change the execution order of test cases. Changing the order of execution can help find test cases that only succeed because of a favorable state.

This plugin provides several options for controlling how the test cases are reordered.

Quick Start

Installation:

pip install pytest-sort --upgrade

Running with pytest-sort:

pytest --sort-mode=random

By default, all tests from the same module or class will run together. This command will randomize the execution order of the tests within the module/class.

pytest --help

In the pytest-sort section, all currently avaialable options will be listed.

You may also set options in any pytest configruation file.

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

Uploaded Source

Built Distribution

pytest_sort-1.2.2-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pytest-sort-1.2.2.tar.gz
Algorithm Hash digest
SHA256 d62f058afb77373426f0533a6c7940111b989721dfbda52898f4fe1226f5e7aa
MD5 324b5d43d3859d93a8a0096bea881b11
BLAKE2b-256 94fde37dca546de19665b16804068fe905724cfd3e9c8125ab022f8965dbe711

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pytest_sort-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2f6fed118de268bde2d14caf69f253a009c1c879dae77540523eb6134632861f
MD5 82803d754ec3f781d1eedaf8dcac038f
BLAKE2b-256 e3886c5ac085177a73d130cb31182506ee98ef718f3888b51bed25d80e19e0a8

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