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.3.tar.gz
.
File metadata
- Download URL: pytest-skip-slow-0.0.3.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.27.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ba043e8b9bbf23bb4cb43fb802d1f5b71823c9869b33434a88170c2c68432ff |
|
MD5 | 5b4998a417e3a345013f792d3f640211 |
|
BLAKE2b-256 | 712d98fea2ff37245314ab70ee1f494b53e0abbc1b8896bbcfac97c2d324ec31 |
File details
Details for the file pytest_skip_slow-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: pytest_skip_slow-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.27.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4b419f545251ce9a24d574c70b15e6f24614d648b5c16ae8551ec0c4b5e48d6 |
|
MD5 | 6400a7b5753354ce15e35528a6f181cf |
|
BLAKE2b-256 | e3c7b280b8e8051760205796fb1597fa660553402ef6d3fd34c8ab1843251680 |