Skip to main content

pytest-skip-slow

A pytest plugin to skip tests marked as @pytest.mark.slow or @pytest.mark.hugemem by default. Include the slow tests with --slow/--run-slow, or memory-intensive tests with --hugemem/--run-hugemem.

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 ====================

Release files for pytest-skip-slow 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-skip-slow 1.1.0
File Size Uploaded
pytest_skip_slow-1.1.0.tar.gz 2.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-skip-slow 1.1.0
File Interpreter ABI Platform
pytest_skip_slow-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.3 kB

Release files / pytest_skip_slow-1.1.0.tar.gz

Download URL pytest_skip_slow-1.1.0.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b56efd39a6e2f333c01774767a76d2c1328139a635bbafc23e2e599c129dd0f2
BLAKE2b-256 checksum
How to use checksums
30faa7076ece17720b9164cbb93f81403c5b62ca86fe14419b8be6ad4341648f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.13

Release files / pytest_skip_slow-1.1.0-py3-none-any.whl

Download URL pytest_skip_slow-1.1.0-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d22c4c40831347aeb6d9cafa40219ae5d75103badf32080bb60317cee00bf10d
BLAKE2b-256 checksum
How to use checksums
61dd8bacb16ecdae7132c21effdf5bb9a41dcf797838c442cd1757277b2d8e7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.13

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0

2 release files

0.0.5

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page