=======================
pytest-markers-presence
=======================
.. image:: https://img.shields.io/pypi/v/pytest-markers-presence.svg
:target: https://pypi.org/project/pytest-markers-presence
:alt: PyPI version
.. image:: https://img.shields.io/pypi/pyversions/pytest-markers-presence.svg
:target: https://pypi.org/project/pytest-markers-presence
:alt: Python versions
.. image:: https://travis-ci.org/livestreamx/pytest-markers-presence.svg?branch=master
:target: https://travis-ci.org/livestreamx/pytest-markers-presence
:alt: See Build Status on Travis CI
.. image:: https://ci.appveyor.com/api/projects/status/github/livestreamx/pytest-markers-presence?branch=master
:target: https://ci.appveyor.com/project/livestreamx/pytest-markers-presence/branch/master
:alt: See Build Status on AppVeyor
.. image:: https://img.shields.io/pypi/dm/pytest-markers-presence.svg
:target: https://pypi.org/project/pytest-markers-presence
:alt: Downloads per month
A simple plugin for easy staging your Python3 project's structure of `PyTest`_ tests.
Make the repository with your tests structured with `Allure`_ ideology.
--------
Features
--------
* Dynamical tests marking based on 'tests' subfolders
* List not classified functions
* List missed Allure BDD tags for test classes and functions (exclude fixtures and other incompatible objects)
* Assertions rewriting with Allure steps including attachments for complex objects:
- Pydantic BaseModels
- dictionaries
- lists
- long strings.
* Collecting of task tracker tickets with specified keyword
* Enable setting of fail exitcode when all session tests were skipped
Installation
------------
You can install "pytest-markers-presence" via `pip`_ from `PyPI`_::
$ pip install pytest-markers-presence
Usage
-----
The `--staging` option is compatible with simple pytest run loop and could be used for dynamical tests marking.
The `--staging-warnings` option just enables warnings for `--staging` option.
The `--assert-steps` option is compatible with simple pytest run loop and could be used for assertions rewriting with
Allure steps.
The `--bdd-format` and `--feature-title` option 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.
The `--all-skipped-fail` option is compatible is simple pytest run loop
and could be used for enabling of fail exitcode setting when all session
tests were skipped.
For example:
script:
- pytest
- pytest --staging --all-skipped-fail
- pytest --assert-steps
- pytest --bdd-format
Examples of 'pytest' run with provided options:
$ pytest tests --staging --assert-steps
======================= test session starts =======================
(hidden for brevity)
==================== 1 passed in 0.51 seconds =====================
$ pytest --bdd-format
======================= test session starts =======================
(hidden for brevity)
You should create test class(es) for your test function(s):
Test function: 'test_function', location: /path/to/test.py
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 ===================
$ pytest --all-skipped-fail
======================= test session starts =======================
(hidden for brevity)
test_fail_on_all_skipped_when_skip.py::test_case SKIPPED [100%]
Changed exitcode to FAILED because all tests were skipped.
======================== 1 skipped in 0.01s =======================
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.
.. _`MIT`: http://opensource.org/licenses/MIT
.. _`BSD-3`: http://opensource.org/licenses/BSD-3-Clause
.. _`GNU GPL v3.0`: http://www.gnu.org/licenses/gpl-3.0.txt
.. _`Apache Software License 2.0`: http://www.apache.org/licenses/LICENSE-2.0
.. _`pytest-markers-presence`: https://github.com/livestreamx/pytest-markers-presence/issues
.. _`PyTest`: https://github.com/pytest-dev/pytest
.. _`Allure`: https://github.com/allure-framework/allure-python
.. _`tox`: https://tox.readthedocs.io/en/latest/
.. _`pip`: https://pypi.org/project/pip/
.. _`PyPI`: https://pypi.org/project
Raw data
{
"_id": null,
"home_page": "https://github.com/livestreamx/pytest-markers-presence",
"name": "pytest-markers-presence",
"maintainer": "Vladislav Mukhamatnurov",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "livestreamepidemz@yandex.ru",
"keywords": null,
"author": "Vladislav Mukhamatnurov",
"author_email": "livestreamepidemz@yandex.ru",
"download_url": "https://files.pythonhosted.org/packages/8c/36/7018eebf51731f1dd6b10c7ffb300ec2ae478e9f26f31a788b863e773761/pytest-markers-presence-0.13.1.tar.gz",
"platform": null,
"description": "=======================\npytest-markers-presence\n=======================\n\n.. image:: https://img.shields.io/pypi/v/pytest-markers-presence.svg\n :target: https://pypi.org/project/pytest-markers-presence\n :alt: PyPI version\n\n.. image:: https://img.shields.io/pypi/pyversions/pytest-markers-presence.svg\n :target: https://pypi.org/project/pytest-markers-presence\n :alt: Python versions\n\n.. image:: https://travis-ci.org/livestreamx/pytest-markers-presence.svg?branch=master\n :target: https://travis-ci.org/livestreamx/pytest-markers-presence\n :alt: See Build Status on Travis CI\n\n.. image:: https://ci.appveyor.com/api/projects/status/github/livestreamx/pytest-markers-presence?branch=master\n :target: https://ci.appveyor.com/project/livestreamx/pytest-markers-presence/branch/master\n :alt: See Build Status on AppVeyor\n \n.. image:: https://img.shields.io/pypi/dm/pytest-markers-presence.svg\n :target: https://pypi.org/project/pytest-markers-presence\n :alt: Downloads per month\n\nA simple plugin for easy staging your Python3 project's structure of `PyTest`_ tests.\nMake the repository with your tests structured with `Allure`_ ideology.\n\n--------\nFeatures\n--------\n\n* Dynamical tests marking based on 'tests' subfolders\n* List not classified functions\n* List missed Allure BDD tags for test classes and functions (exclude fixtures and other incompatible objects)\n* Assertions rewriting with Allure steps including attachments for complex objects:\n - Pydantic BaseModels\n - dictionaries\n - lists\n - long strings.\n* Collecting of task tracker tickets with specified keyword\n* Enable setting of fail exitcode when all session tests were skipped\n\n\nInstallation\n------------\n\nYou can install \"pytest-markers-presence\" via `pip`_ from `PyPI`_::\n\n $ pip install pytest-markers-presence\n\n\nUsage\n-----\n\nThe `--staging` option is compatible with simple pytest run loop and could be used for dynamical tests marking.\nThe `--staging-warnings` option just enables warnings for `--staging` option.\n\nThe `--assert-steps` option is compatible with simple pytest run loop and could be used for assertions rewriting with\nAllure steps.\n\nThe `--bdd-format` and `--feature-title` option will not run your tests and it's also sensible for errors in the pytest\ncollection step. If you are using as part of you CI process the recommended way is to run it after the default test run.\n\nThe `--all-skipped-fail` option is compatible is simple pytest run loop\nand could be used for enabling of fail exitcode setting when all session\ntests were skipped.\n\nFor example:\n\n script:\n - pytest\n\n - pytest --staging --all-skipped-fail\n\n - pytest --assert-steps\n\n - pytest --bdd-format\n\n\nExamples of 'pytest' run with provided options:\n\n $ pytest tests --staging --assert-steps\n\n ======================= test session starts =======================\n\n (hidden for brevity)\n\n ==================== 1 passed in 0.51 seconds =====================\n\n\n\n $ pytest --bdd-format\n\n ======================= test session starts =======================\n\n (hidden for brevity)\n\n You should create test class(es) for your test function(s):\n Test function: 'test_function', location: /path/to/test.py\n\n You should set BDD tag '@allure.feature' for your test class(es):\n Test class: 'TestClass', location: /path/to/file.py\n\n You should set BDD tag '@allure.story' for your test function(s):\n Test function: 'test_case', location: /path/to/file.py\n\n ================== no tests ran in 0.00 seconds ===================\n\n $ pytest --all-skipped-fail\n\n ======================= test session starts =======================\n\n (hidden for brevity)\n\n test_fail_on_all_skipped_when_skip.py::test_case SKIPPED [100%]\n\n Changed exitcode to FAILED because all tests were skipped.\n\n ======================== 1 skipped in 0.01s =======================\n\n\nContributing\n------------\nContributions are very welcome. Tests can be run with `tox`_, please ensure\nthe coverage at least stays the same before you submit a pull request.\n\nLicense\n-------\n\nDistributed under the terms of the `MIT`_ license, \"pytest-markers-presence\" is free and open source software\n\n\nIssues\n------\n\nIf you encounter any problems, please `pytest-markers-presence`_ along with a detailed description.\n\n.. _`MIT`: http://opensource.org/licenses/MIT\n.. _`BSD-3`: http://opensource.org/licenses/BSD-3-Clause\n.. _`GNU GPL v3.0`: http://www.gnu.org/licenses/gpl-3.0.txt\n.. _`Apache Software License 2.0`: http://www.apache.org/licenses/LICENSE-2.0\n.. _`pytest-markers-presence`: https://github.com/livestreamx/pytest-markers-presence/issues\n.. _`PyTest`: https://github.com/pytest-dev/pytest\n.. _`Allure`: https://github.com/allure-framework/allure-python\n.. _`tox`: https://tox.readthedocs.io/en/latest/\n.. _`pip`: https://pypi.org/project/pip/\n.. _`PyPI`: https://pypi.org/project\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A simple plugin to detect missed pytest tags and markers\"",
"version": "0.13.1",
"project_urls": {
"Homepage": "https://github.com/livestreamx/pytest-markers-presence"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d383c53f47294a1659e9e5d2564b5199a091ed2a440a27e89c62d7fed9dfafb2",
"md5": "c638c6186377ed2b7bcee7cdc06d282f",
"sha256": "8e73548f63b94ba1e18934642d035ad51ef93d8564f13239fdc7ad33efdccf00"
},
"downloads": -1,
"filename": "pytest_markers_presence-0.13.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "c638c6186377ed2b7bcee7cdc06d282f",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.7",
"size": 8719,
"upload_time": "2024-10-30T11:31:41",
"upload_time_iso_8601": "2024-10-30T11:31:41.371508Z",
"url": "https://files.pythonhosted.org/packages/d3/83/c53f47294a1659e9e5d2564b5199a091ed2a440a27e89c62d7fed9dfafb2/pytest_markers_presence-0.13.1-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8c367018eebf51731f1dd6b10c7ffb300ec2ae478e9f26f31a788b863e773761",
"md5": "f36fbe748141ec597139b3536895f380",
"sha256": "f9e2c3ade6bb21f23ab1ef58282da4d4e33549377177a17bae384e21cbad0f70"
},
"downloads": -1,
"filename": "pytest-markers-presence-0.13.1.tar.gz",
"has_sig": false,
"md5_digest": "f36fbe748141ec597139b3536895f380",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 9436,
"upload_time": "2024-10-30T11:31:42",
"upload_time_iso_8601": "2024-10-30T11:31:42.980597Z",
"url": "https://files.pythonhosted.org/packages/8c/36/7018eebf51731f1dd6b10c7ffb300ec2ae478e9f26f31a788b863e773761/pytest-markers-presence-0.13.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-30 11:31:42",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "livestreamx",
"github_project": "pytest-markers-presence",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"appveyor": true,
"tox": true,
"lcname": "pytest-markers-presence"
}