https://github.com/saltstack/pytest-skip-markers
A Pytest plugin which implements a few useful skip markers
https://github.com/saltstack/pytest-skip-markers
Last synced: 4 months ago
JSON representation
A Pytest plugin which implements a few useful skip markers
- Host: GitHub
- URL: https://github.com/saltstack/pytest-skip-markers
- Owner: saltstack
- License: apache-2.0
- Created: 2021-10-01T16:10:51.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-08-09T17:05:45.000Z (over 1 year ago)
- Last Synced: 2025-01-29T11:21:57.152Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 217 KB
- Stars: 3
- Watchers: 11
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
.. image:: https://img.shields.io/github/workflow/status/saltstack/pytest-skip-markers/CI?style=plastic
:target: https://github.com/saltstack/pytest-skip-markers/actions/workflows/testing.yml
:alt: CI
.. image:: https://readthedocs.org/projects/pytest-skip-markers/badge/?style=plastic
:target: https://pytest-skip-markers.readthedocs.io
:alt: Docs
.. image:: https://img.shields.io/codecov/c/github/saltstack/pytest-skip-markers?style=plastic&token=CqV7t0yKTb
:target: https://codecov.io/gh/saltstack/pytest-skip-markers
:alt: Codecov
.. image:: https://img.shields.io/pypi/pyversions/pytest-skip-markers?style=plastic
:target: https://pypi.org/project/pytest-skip-markers
:alt: Python Versions
.. image:: https://img.shields.io/pypi/wheel/pytest-skip-markers?style=plastic
:target: https://pypi.org/project/pytest-skip-markers
:alt: Python Wheel
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=plastic
:target: https://github.com/psf/black
:alt: Code Style: black
.. image:: https://img.shields.io/pypi/l/pytest-skip-markers?style=plastic
:alt: PyPI - License
..
include-starts-here
====================
What is Skip Markers
====================
This pytest plugin was extracted from `pytest-salt-factories`_. It's a collection of
of useful skip markers created to simplify and reduce code required to skip tests in
some common scenarios, for example, platform specific tests.
.. _pytest-salt-factories: https://github.com/saltstack/pytest-salt-factories
Install
=======
Installing Skip Markers is as simple as:
.. code-block:: bash
python -m pip install pytest-skip-markers
And, that's honestly it.
Usage
=====
Once installed, you can now skip some tests with some simple pytest markers, for example.
.. code-block:: python
import pytest
@pytest.mark.skip_unless_on_linux
def test_on_linux():
assert True
Contributing
============
The pytest-skip-markers project team welcomes contributions from the community.
For more detailed information, refer to `CONTRIBUTING`_.
.. _CONTRIBUTING: https://github.com/saltstack/pytest-skip-markers/blob/main/CONTRIBUTING.md
..
include-ends-here
Documentation
=============
The full documentation can be seen `here `_.