pytest-extra-markers
A pytest plugin to dynamically skip tests based on marks
Installation
pip install git+https://github.com/iwishiwasaneagle/pytest-extra-markers@master
Usage
Consider the following test scenario:
import pytest
# A
def test_speedy_unit_test():
...
# B
@pytest.mark.integration
def test_integration_test():
...
# C
@pytest.mark.slow_integration
def test_super_slow_integration_test():
...
You want to quickly run all your quick unit tests before committing. Then, after you are happy that the changes haven't messed up any unit tests you want to run the integration tests, and then after that your super slow integration tests. This would look like:
pytest
pytest --only-integration
pytest --only-slow-integration
In theory, your quick unit tests give you feedback instantly about anything that's been broken by your changes. After that, the slower integration tests can be run to have a more broad check.
Author's note My use cases is mainly for simulations, so the
--only-slow-integrationflag can sometimes take tens of minutes to run whereas an integration test might take milliseconds. Therefore, I made the distinction between the two.
CLI Flags
| Flag | Description |
|---|---|
--with-integration |
Run all unit + integration tests |
--with-slow-integration |
Run all unit + slow integration tests |
--only-integration |
Only run integration tests |
--only-slow-integration |
Only run slow integration tests |
Todo
- Publish to PyPi
Metadata
Release files for pytest-extra-markers 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytest_extra_markers-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for pytest_extra_markers-1.0.0-py3-none-any.whl |
Release files / pytest_extra_markers-1.0.0-py3-none-any.whl
| Download URL | pytest_extra_markers-1.0.0-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1a09dba8e47d628239c7472aaac874ca9ff23d0a963363288ee1058a4729fa6b
|
|
BLAKE2b-256 checksum How to use checksums |
94355ae7452dc0f8e877511e7db80e173721509b52c9996cf9aebaf7ba034197
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Security for pytest-extra-markers 1.0.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.