Skip to main content

A simple plugin to detect missed pytest tags and markers"

Project description

PyPI version Python versions See Build Status on Travis CI See Build Status on AppVeyor

A simple plugin to detect missed PyTest tags and Allure BDD markers. Make the repository with your tests more structured and beautiful.


Features

  • List not staged test classes and not classified functions

  • List missed Allure BDD tags for traditional test classes and functions (exclude fixtures and other incompatible objects)

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 –bdd-markers

Example of ‘pytest’ run with provided options:

$ pytest –stage-markers

=================== test session starts ===================

(hidden for brevity)

You should set stage tag with @pytest.mark’ for your test class(es): Test class name: ‘TestClass’, location: /path/to/file.py

You should create test class(es) for your test function(s): Test function: ‘test_function’, location: /path/to/other_file.py

============== no tests ran in 0.00 seconds ===============

$ pytest –bdd-markers

=================== test session starts ===================

(hidden for brevity)

You should set BDD tag @allure.feature’ for your test class(es): Test class: ‘TestClass’, location: /path/to/file.py

You should set BDD tag @allure.story’ for your test function(s): Test function: ‘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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-markers-presence-0.4.0.tar.gz (6.0 kB view hashes)

Uploaded Source

Built Distribution

pytest_markers_presence-0.4.0-py2.py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page