A simple plugin to list unused fixtures in pytest
Project description
A simple plugin to list unused fixtures in a pytest suite.
Features
List unused fixtures in your tests
Installation
You can install “pytest-deadfixtures” via pip from PyPI:
$ pip install pytest-deadfixtures
Usage
Just run ‘pytest’ with an extra option ‘–dead-fixtures’:
$ pytest --dead-fixtures ============================= test session starts ============================== (hidden for brevity) Hey there, I believe the following fixture(s) are not being used: Fixture name: some_fixture, location: test_write_docs_when_verbose.py:5 ========================= no tests ran in 0.00 seconds =========================
Using some level of verbosity will also print the docstring of each fixture:
$ pytest --dead-fixtures -v ============================= test session starts ============================== (hidden for brevity) Hey there, I believe the following fixture(s) are not being used: Fixture name: some_fixture, location: test_write_docs_when_verbose.py:5 Blabla fixture docs ========================= no tests ran in 0.00 seconds =========================
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 MIT license, ‘pytest-deadfixtures’ 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
Hashes for pytest-deadfixtures-0.2.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a10d98009fad304c26d797571bce3d3497a0d3c9ffc45a09e85fa845252313c |
|
MD5 | f1a746e7b62c8e2ecc263a6b74514ab4 |
|
BLAKE2b-256 | d0012f9f5d9527b23c9c74c2f2b1cb8f16b3859f3bd3ea76b4f30e66fbdb2357 |