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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest_skip_slow-1.1.0.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_skip_slow-1.1.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file pytest_skip_slow-1.1.0.tar.gz.

File metadata

  • Download URL: pytest_skip_slow-1.1.0.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for pytest_skip_slow-1.1.0.tar.gz
Algorithm Hash digest
SHA256 b56efd39a6e2f333c01774767a76d2c1328139a635bbafc23e2e599c129dd0f2
MD5 bb488a269ed9a31b34b8ee54ff9ea0a6
BLAKE2b-256 30faa7076ece17720b9164cbb93f81403c5b62ca86fe14419b8be6ad4341648f

See more details on using hashes here.

File details

Details for the file pytest_skip_slow-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_skip_slow-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d22c4c40831347aeb6d9cafa40219ae5d75103badf32080bb60317cee00bf10d
MD5 8bf8a76dc115f265ab32c6e824ab60d2
BLAKE2b-256 61dd8bacb16ecdae7132c21effdf5bb9a41dcf797838c442cd1757277b2d8e7b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 files

1.0

2 files

0.0.5

2 files

0.0.3

2 files

0.0.2

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page