A pytest plugin to skip `@pytest.mark.slow` tests by default.
Project description
pytest-skip-slow
A pytest plugin to skip @pytest.mark.slow
tests by default.
Include the slow tests with --slow
.
Installation
$ pip install pytest-skip-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 ===========================
Run only the slow tests with -m slow --slow
:
(venv) $ pytest -v -m slow --slow test_slow.py
========================= test session starts ==========================
collected 2 items / 1 deselected / 1 selected
test_slow.py::test_slow PASSED [100%]
=================== 1 passed, 1 deselected 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
Built Distribution
File details
Details for the file pytest-skip-slow-0.0.5.tar.gz
.
File metadata
- Download URL: pytest-skip-slow-0.0.5.tar.gz
- Upload date:
- Size: 1.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 655ea5c748c72947e0d302334e7fa8ef99929257a2a2bc928f630ddb5a161d88 |
|
MD5 | 27977c9016fdfeaeae32b0076d3d8c1e |
|
BLAKE2b-256 | 7ecf507ddfc0f43492bf1cd3fd192fab672de62a381d85a7c8fcd55e5364dd7d |
File details
Details for the file pytest_skip_slow-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: pytest_skip_slow-0.0.5-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2f6401d6ed0db3be1402622a7b24f7df14f61ebd26feda808a0d45433d4d474 |
|
MD5 | 4fbb78b596299d3b16746443f80cfa85 |
|
BLAKE2b-256 | 1d4376edc0738298170fef6e2a9315ef96ed0d5c77de381b2ec1b54d43838a91 |