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 Fedora Hosted:
https://fedorahosted.org/released/python-pytest-sourceorder/
The goal is to include this project in Fedora repositories. Until that happens, you can use testing builds from COPR – see “Developer links” below.
- You can also install using pip:
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 format your contribution using the FreeIPA patch guidelines, and send it to <freeipa-devel@redhat.com>. Any development discussion is welcome there.
Someday the project might get its own list, but that seems premature now.
Developer links
Bug tracker: https://fedorahosted.org/python-pytest-sourceorder/report/3
Code browser: https://git.fedorahosted.org/cgit/python-pytest-sourceorder
git clone https://git.fedorahosted.org/git/python-pytest-sourceorder.git
Unstable packages for Fedora: https://copr.fedoraproject.org/coprs/pviktori/pytest-plugins/
To release, update version in setup.py, add a Git tag like “v0.3”, and run make tarball. Running make upload will put the tarball to Fedora Hosted and PyPI, and a SRPM on Fedorapeople, if you have the rights. Running make release will upload and fire a COPR build.
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
Built Distribution
File details
Details for the file pytest-sourceorder-0.1.tar.gz
.
File metadata
- Download URL: pytest-sourceorder-0.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfeddf260e02beda7ff078568e002f18ac15e8fb600a5a2655a6f58e393b2d68 |
|
MD5 | dc492307805713aa6163d6f8c46fcbb5 |
|
BLAKE2b-256 | 52f41e681399504423f55e24830afeb60ed4a6d3887ecd19bc54c835d58dde8b |
File details
Details for the file pytest_sourceorder-0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: pytest_sourceorder-0.1-py2.py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40930dcac2caacf2630d34225e4af224c987fc72683828f1b6409abf94b46265 |
|
MD5 | a9b0366c477b0f7f5e960579eb5f9729 |
|
BLAKE2b-256 | bb6424cd5cf90f3bc831e8097a91f33be17fc73a1e5055e8e57ce171ea58985b |