A simple plugin to detect missed pytest tags and markers"
Project description
A simple plugin to detect missed pytest tags and markers
This pytest plugin was generated with Cookiecutter along with @hackebrot’s cookiecutter-pytest-plugin template.
Features
List not staged test classes
List missed Allure BDD tags for test classes and functions (exclude fixtures)
Installation
You can install “pytest-markers-presence” via pip from PyPI:
$ pip install pytest-markers-presence
Usage
The –stage-markers and other provided options will not run your tests and it’s also sensible for errors in the pytest collection step. If you are using as part of you CI process the recommended way is to run it after the default test run. For example:
- script:
pytest
pytest –stage-markers
pytest –bdd-markers
pytest –stage-markers –bdd-markers
Example of ‘pytest’ run with provided options:
$ pytest –stage-markers
=================== test session starts ===================
(hidden for brevity)
You should set stage marker with ‘@pytest.mark’ (‘unit’, ‘integration’ or ‘system’) for your test class(es): Test class name: ‘TestClass’, location: /path/to/file.py
============== no tests ran in 0.00 seconds ===============
$ pytest –bdd-markers
=================== test session starts ===================
(hidden for brevity)
You should set BDD marker ‘@allure.feature’ for your test class(es): Test class name: ‘TestClass’, location: /path/to/file.py
You should set BDD marker ‘@allure.story’ for your test function(s): Test case name: ‘test_case’, location: /path/to/file.py
============== 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-markers-presence” is free and open source software
Issues
If you encounter any problems, please pytest-markers-presence 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-markers-presence-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88da032b9b54673a2460c5901d9278bfc815aab98cc4941def86003a085be3bf |
|
MD5 | 5ee3d7409513c70224b927bef9efdf0d |
|
BLAKE2b-256 | 2283c56cdcfb850a0ea092ff20c3bb920e8268c4e23ede76ee467401517b2338 |
Hashes for pytest_markers_presence-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f375fcf5217985cd3c85e37aebdc0e982b3bda793709125c2cc7623a4e337bc |
|
MD5 | 5b01ba332a9b73fce98815b9f3f7b7fa |
|
BLAKE2b-256 | a2f68ac2336685583906318e3d4abe48305ca5b5b37c90c0e3eba7f6170bb80d |