Skip to main content

Test-ordering plugin for pytest

Project description

A pytest plugin for ensuring tests within a class are run in source order.

Downloading

Release tarballs will be made available for download from Pagure Releases:

https://pagure.io/releases/python-pytest-sourceorder/

You can also install using pip:

https://pypi.python.org/pypi/pytest-sourceorder

The plugin is also available in Fedora repositories as python3-pytest-sourceorder.

Usage

When installed, test classes marked @pytest_sourceorder.ordered will have tests tun in the order of their definition.

Methods are ordered by line nuber of their definition, so spreading them between multiple files or otherwise defining them outside of their class might cause the plugin to order them wrong.

When inheriting from an ordered test class, the superclass’ methods will be run first (even if overridden), followed by the ones from subclasses. You generally do not want to apply an additional @ordered decorator to the subclasses – doing so will reset the inheritance-based ordering.

Contributing

The project is happy to accept patches! Please file any patches as Pull Requests on the project’s Pagure repo. Any development discussion should be in Pagure Pull Requests and Issues.

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-sourceorder-0.5.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_sourceorder-0.5.1-py2.py3-none-any.whl (5.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pytest-sourceorder-0.5.1.tar.gz.

File metadata

File hashes

Hashes for pytest-sourceorder-0.5.1.tar.gz
Algorithm Hash digest
SHA256 ed39536ca992662b5d61a651c4e172cd68ec56413eb0652cb6b2fbe07b7dfe29
MD5 6e8227d874740847fd8e73791ac3858c
BLAKE2b-256 a63ccf624e79b936256914dcdbab92010b8c1243ba31365f75e7b3f86b26e8de

See more details on using hashes here.

File details

Details for the file pytest_sourceorder-0.5.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_sourceorder-0.5.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 672b1056cae1fe5d9f05828e817ec77095436be094e1d9457a9dc3a735613f19
MD5 7930805e8ce927b6eac99b440cdb8e03
BLAKE2b-256 d8d043586935b1431f02ab17693b7b7ae4ac284fab39918664bfc3d1f642db2e

See more details on using hashes here.

Supported by

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