https://github.com/everythingme/pytest-disable
pytest plugin to disable a test and skip it from testrun
https://github.com/everythingme/pytest-disable
Last synced: 10 months ago
JSON representation
pytest plugin to disable a test and skip it from testrun
- Host: GitHub
- URL: https://github.com/everythingme/pytest-disable
- Owner: EverythingMe
- Created: 2015-09-08T14:12:46.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-10T13:29:17.000Z (almost 11 years ago)
- Last Synced: 2025-02-02T13:46:38.947Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 129 KB
- Stars: 0
- Watchers: 11
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
pytest-disable
==============
pytest plugin to disable a test and skip it from testrun.
Install with:
pip install pytest-disable
Usage:
import pytest
@pytest.mark.disable(reason='Test is flaky and fails')
def test_foo():
assert True==False
def test_bar():
assert True
Yields this output:
$ py.test -sv test_foo.py
===================================== test session starts ======================================
platform darwin -- Python 2.7.10 -- py-1.4.30 -- pytest-2.7.10 -- /usr/bin/python
plugins: disable
collected 2 items
test_foo.py::test_foo SKIPPED
test_foo.py::test_bar PASSED
=================================== short test summary info ====================================
SKIP [1] test_foo.py:3: Test is flaky and fails.
============================= 1 passed, 1 skipped in 0.01 seconds ==============================