Skip to main content

A pytest plugin to skip `@pytest.mark.slow` tests by default.

Project description

#START:top

pytest-slow

A pytest plugin to skip @pytest.mark.slow tests by default. Include the slow tests with --slow.

#END:top

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


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.1.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

pytest_slow-0.0.1-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file pytest-slow-0.0.1.tar.gz.

File metadata

  • Download URL: pytest-slow-0.0.1.tar.gz
  • Upload date:
  • Size: 1.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.26.0

File hashes

Hashes for pytest-slow-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b347d2364768f3b1c8f251275b542bb0f7d1b0c4dbcf6cee19822110e2e27f27
MD5 97fe22222d9d16f3b5675a229a1f42ce
BLAKE2b-256 5a95342a25caaf8a12b5697a487eff3b7a9ed16444aae9e6e864d99e1e8f2350

See more details on using hashes here.

File details

Details for the file pytest_slow-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_slow-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7f04ee898915bda1b435f236b593d7b706e4b5fdd94f83c2e32e7504ac976d3c
MD5 2aa670db7cbb9997aaf4b69e3fa682ac
BLAKE2b-256 7b3a6dedef868688fe387b6ea53ec101b98ad452c0cea648455d02b7d528aca8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page