pytest-filterfixtures
pytest-filterfixtures is a pytest plugin to filter tests based on their fixtures.
This is particularly useful in large test codebases when fixtures require changes/refactoring, or a specific fixture stops wokring due to external reasons. You can work on modifying the fixture(s) and have better control over which tests should run.
Installation
Install with pip
pip install pytest-filterfixtures
Usage
pytest-filterfixtures adds the following command line options:
--include-fixturesto execute all tests that use at least one of the specified fixtures as part of their setup/teardown--exclude-fixturesto deselect all tests that use at least one of the specified fixtures as part of their setup/teardown
Example
Given the following test file
@pytest.fixture()
def fixt1():
return 1
@pytest.fixture()
def fixt2():
return 2
@pytest.fixture()
def fixt3(fixt1):
return fixt1 + 1
def test1(fixt1):
...
def test2(fixt2):
...
def test3(fixt3):
...
pytest --include-fixtures fixt1 fixt2executestest1, test2, test3pytest --include-fixtures fixt3executestest3pytest --exclude-fixtures fixt1executestest2pytest --exclude-fixtures fixt3 --include-fixtures fixt1executestest1
Metadata
Release files for pytest-filterfixtures 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytest_filterfixtures-0.1.0.tar.gz | 1.9 kB | Without provenance | Details for pytest_filterfixtures-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytest_filterfixtures-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pytest_filterfixtures-0.1.0-py3-none-any.whl |
Total release size: 4.9 kB
Release files / pytest_filterfixtures-0.1.0.tar.gz
| Download URL | pytest_filterfixtures-0.1.0.tar.gz |
|---|---|
| Size | 1.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3530402c2ea3b9688d61815343777b41f7e4756a87b1387aa211df33871cd1af
|
|
BLAKE2b-256 checksum How to use checksums |
bda45e6a924b4582634bbfbe3daa4a9b0bab8294393a4d7b86ac17f59cb2559f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pytest_filterfixtures-0.1.0-py3-none-any.whl
| Download URL | pytest_filterfixtures-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0365adebb1875a3ba9df9f2a3de36e06ce340f8531f4575405ea1703c2e63364
|
|
BLAKE2b-256 checksum How to use checksums |
927818a57158b310c2a051ff59b622d03ab6e9d70f8b7d004b63e0dce928bfd0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for pytest-filterfixtures 0.1.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.