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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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