A pytest plugin to skip `@pytest.mark.slow` tests by default.
Project description
pytest-slow
A pytest plugin to skip @pytest.mark.slow
tests by default.
Include the slow tests with --slow
.
Installation
$ pip install pytest-slow
Usage
Example test_slow.py
:
import pytest
def test_normal():
pass
@pytest.mark.slow
def test_slow():
pass
Normal pytest sessions skip slow tests:
(venv) $ pytest -v test_slow.py
========================= test session starts ==========================
collected 2 items
test_slow.py::test_normal PASSED [ 50%]
test_slow.py::test_slow SKIPPED (need --slow option to run) [100%]
===================== 1 passed, 1 skipped in 0.00s =====================
Include the slow tests with --slow
.
(venv) $ pytest -v --slow test_slow.py
========================= test session starts ==========================
collected 2 items
test_slow.py::test_normal PASSED [ 50%]
test_slow.py::test_slow PASSED [100%]
========================== 2 passed in 0.00s ===========================
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
pytest-slow-0.0.2.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for pytest_slow-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 844b836d23dc0973444f134c6398a6b45222705d2e29640c6cadfcc7490c13a2 |
|
MD5 | e49a968d7a9c54ecd28275b847f5ce0c |
|
BLAKE2b-256 | 75b09c16e85b3dc55e9bd16abe176e68b3176201bdd11c4a389a707bb251d5a5 |