Warn or fail on fixture name clash
Project description
pytest-fixture-rtttg
In the face of ambiguity, refuse the temptation to guess.
This plugin detects when you have two fixtures that share the same name, and throws an error in that case, instead of silently choosing the later/inner-most one.
Installation
pip install pytest-fixture-rtttg
After this, the plugin should automatically do its job.
Customization
When the duplicate name is intentional, you can use the dupe
mark to stop
this from happening:
@pytest.fixture
@pytest.mark.dupe
def some_fixture():
...
Usually though, you're better of just choosing a different name.
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
File details
Details for the file pytest-fixture-rtttg-0.1.1.tar.gz
.
File metadata
- Download URL: pytest-fixture-rtttg-0.1.1.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.10.0 Darwin/21.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e0224af91993f7851a0d62cabf6b6f9792fcbf21fd96e57b33e0e2596fed1cf |
|
MD5 | 2a4e7d480dc4a3dd6777d7d310d0dc0d |
|
BLAKE2b-256 | ec0d5c5d2948a6b195eeddc26850bfe56efa868d04bc7e364574d5110f5a3aef |
File details
Details for the file pytest_fixture_rtttg-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pytest_fixture_rtttg-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.10.0 Darwin/21.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd08e94c46f3d1fca0e5d272015639d17a7f40fc55cfa0a327f456086e1ffc22 |
|
MD5 | 69c2f3e7e6e8a6b560e77b0d7cca3bb2 |
|
BLAKE2b-256 | c1d57c2344007a7cfabe973f4b251009d32feb2de32418cd069ce08a23c059ff |