Skip matching marks. Matches partial marks using wildcards.
Project description
Skip matching marks. Matches partial marks using wildcards.
This Pytest plugin was generated with Cookiecutter along with @hackebrot’s Cookiecutter-pytest-plugin template.
Features
Allows any tag to be used for a skip or xfail
Wildcards can be used for tags with variable parts (ie: Specify bug_.* for bug_123, bug_777)
Important tags can be specified and the user will be warned when they’re skipped
Tags that should be skipped can be forced to run anyways
Installation
You can install “pytest-match-skip” via pip from PyPI:
pip install pytest-match-skip
Usage
pytest ini options
- The following options can be added to a pytest.ini file:
skip_marks: List of marks that will be detected
important_marks: List of marks that will warn the user if skipped
run_skips: true or false to run tests with a skip mark
xfail_skips: true or false to xfail instead of skip the marked tests
Example:
[pytest] skip_marks = bug_.* .*_tracker .*_known_failure_.* important_marks = smoke .*_sanity important_.* run_skips = false xfail_skips = false
Hooks
The following pytest hooks are available:
pytest_match_skip_reason(request, message) - Called if a test is skipped
pytest_match_skip_run_skip_warning(request, message) - Called if run_skips is true and a test would otherwise be skipped.
pytest_match_skip_important_warning(request, message) - Called when important_marks are skipped
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-match-skip” is free and open source software
Issues
If you encounter any problems, please file an issue along with a detailed description.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file pytest_match_skip-0.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: pytest_match_skip-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9aea0c4880c96d26641f299c2b81515a5fb87f2b155ec79c83f0d34cf70eaba1 |
|
MD5 | f3767b3671a8b8cfea486f586262aab0 |
|
BLAKE2b-256 | ec3f2e8a984b7b2e4d74743ff61060bbc27a6a86b769c2ee450953161ab64063 |