A pytest plugin to collect tests based on fixtures being used by tests
Reason this release was yanked:
Wrong Version
Project description
A pytest plugin to collect tests based on fixtures being used in tests
This pytest plugin was generated with Cookiecutter along with @hackebrot’s cookiecutter-pytest-plugin template.
Features
Filter tests collection/execution based on fixtures being used by tests
One or more number(comma separated) of fixtures are supported with option –uses-fixtures
One can combine fixture based collection with pytests default options/plugins for further smart collection.
Requirements
Python >= 3.9
Pytest >= 3.5
Installation
You can install “pytest-fixturecollection” via pip from PyPI:
$ pip install pytest-fixturecollection
Usage
Once plugin is installed, run pytest command with “–uses-fixtures” option as shown below:
# pytest --uses-fixtures fixture1,fixture2 tests/
Explanation: All the tests using fixture1 or fixture2 inside tests directory would be collected and executed and rest tests would be uncollected (not executed). You can also choose to just –collect-only to view what tests are collected.
Contributing
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
License
Distributed under the terms of the BSD-3 license, “pytest-fixturecollection” is free and open source software
Issues
If you encounter any problems, please file an issue along with a detailed description.
Project details
Release history Release notifications | RSS feed
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
Hashes for pytest-fixturecollection-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80ed4af6c51c79c96ef16635a7bacf345bea9e9c15ccf16097a98fdb67f80108 |
|
MD5 | c40ad3508a95197a0840902fe6ff04a6 |
|
BLAKE2b-256 | 1e537fe2823df3a2e7585a077d05c318b53e92eff69f1c7556dd30104f098859 |
Hashes for pytest_fixturecollection-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7e47f5b651a1285b98b83a94ba9ca3ef4a6bd0d1cd016a24bb341a5e35f69ed |
|
MD5 | f0dad1e50e9b1efd3badf479aa88952b |
|
BLAKE2b-256 | d7d6fff2c2a0ef9d59f6005ba2488b1b47b0ed056cb0078c6c4e706c94118b93 |