Filter pytest marks by name using match kw
Project description
Mark Filter
Most pytest marks accept additional keywords arguments. This plugin will check for the match and not_match keywords. Any test that has the string in its name will be filtered accordingly. You can use both at the same time too.
Match
import pytest
pytestmark = [
pytest.mark.skipif(match="skip")
]
def test_normal():
pass
def test_skip():
pass
def test_other():
pass
Any test that has "skip" in the name will get the mark. In this case, test_skip.
Not Match
import pytest
pytestmark = [
pytest.mark.skipif(not_match="skip")
]
def test_normal():
pass
def test_skip():
pass
def test_other():
pass
Any test that doesn't have "skip" in the name will get the mark. In this case, test_normal and test_other.
Installing
pip install pytest-mark-filter
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest_mark_filter-0.1.1.tar.gz.
File metadata
- Download URL: pytest_mark_filter-0.1.1.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9929c7af217b1c3c051a88b6d67ec3b62adac1eb67d846206a9bf8601c24070
|
|
| MD5 |
aede1a833a2cb83f4451727dbe1ec5a7
|
|
| BLAKE2b-256 |
079ed65706d24c452db322a760e02b7f78578eb1b2d4f19e66fbbde5b4030fda
|
File details
Details for the file pytest_mark_filter-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pytest_mark_filter-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5428d4704ca7e39bd31904364ec00bbe63a06ec907c1dacc2d7d204462673b9d
|
|
| MD5 |
05132aa9259b45eec60fc8b1a14f5b40
|
|
| BLAKE2b-256 |
acd89553755293e609a9ba0dafc38fba6a4ed3c6700f0ff651ab8ec56f663b6b
|