Registry / testing / pytest-skip-slow

pytest-skip-slow

JSON →
library1.1.0pypypi✓ verified 87d ago

pytest-skip-slow is a pytest plugin that enhances test execution by allowing users to mark tests as 'slow'. By default, tests marked with `@pytest.mark.slow` are skipped, helping maintain a fast local development feedback loop. These slow tests can then be explicitly included using the `--slow` command-line option. The current version is 0.0.5, released in February 2023, indicating a mature but infrequently updated project.

pip install pytest-skip-slow
INSTALL
IMPORT
SIG · PYTEST-SKIP-SLOW
P
pytest-skip-slow
testingpythonv1.1.0
Install
2.7s avg
Import
419ms
Disk
29MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.450s · 30.7MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 2.7s · import 0.389s · 31MB
29MB installed
● package 29MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

@pytest.mark.slow
import pytest @pytest.mark.slow def test_my_slow_function(): ...
pytest-skip-slow is a plugin that integrates with pytest's marking system; it does not have direct Python imports from the plugin itself.

Mark your long-running tests with `@pytest.mark.slow`. By default, `pytest` will skip these tests after the plugin is installed. To include and run these slow tests, use the `--slow` command-line option. To run only slow tests, combine with the marker expression `-m slow`.

import pytest import time def test_fast_calculation(): assert 1 + 1 == 2 @pytest.mark.slow def test_long_running_process(): time.sleep(2) # Simulate a slow operation assert True # To run fast tests (skipping slow by default): # $ pytest # To include slow tests: # $ pytest --slow # To run ONLY slow tests: # $ pytest -m slow --slow
pytest --version
Debug
Known issues
gotchaRunning `pytest -m slow` alone will still skip tests marked with `@pytest.mark.slow` if `pytest-skip-slow` is active, as its default behavior is to skip them. To run *only* slow tests, you must explicitly include them with `--slow`.
fix
Use `pytest -m slow --slow` to execute only the tests marked as slow.
affects: All versions
gotchaPytest recommends declaring custom markers in your `pytest.ini` file to prevent `PytestUnknownMarkWarning`. While `pytest-skip-slow` provides the functionality, adding 'slow' to `markers` section in `pytest.ini` is a good practice.
fix
Add `slow: marks tests as slow` under the `[pytest]` section in your `pytest.ini` file.
affects: All versions of pytest and pytest-skip-slow
Errors
Common errors & fixes
pytest: error: unrecognized arguments: --slow
The `pytest-skip-slow` plugin is either not installed, or pytest is not detecting it correctly in your environment.
fix
Ensure `pytest-skip-slow` is installed in your active Python environment: `pip install pytest-skip-slow`.
=========================== 0 passed, 1 skipped in 0.XXs =========================== (when expecting slow tests to run)
Tests marked with `@pytest.mark.slow` are being skipped by default, which is the intended behavior of the plugin when the `--slow` flag is not present.
fix
To include and run these tests, execute `pytest --slow`.
PytestCollectionWarning: 'slow' not found in 'markers' configuration option.
This is a warning from pytest itself, indicating that the `slow` marker is used but not explicitly declared in the `pytest.ini` configuration file.
fix
Add `markers = slow: marks tests as slow` to the `[pytest]` section of your `pytest.ini` file to suppress this warning.
Upgrade
Version history
1.1.0latest on PyPI · released May 27, 2026
Audit
Dependencies
pytestrequiredThis is a pytest plugin and requires pytest to function.
pythonrequiredRequires Python version 3.7 or higher.
Agent activity
9 hits · last 30 days
node
8
Resources
pytest-skip-slow — pip install pytest-skip-slow · libregistry