Install & Compatibility
Where this runs
tested against v0.6.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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 30.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.8s · import 0.000s · 31MB
29MB installed
● package 29MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
pytest_addoption
✓ from pytest_fail_slow import pytest_addoption
✗ from pytest_fail_slow import fail_slow
pytest_configure
✓ from pytest_fail_slow import pytest_configure
pytest_runtest_setup
✓ from pytest_fail_slow import pytest_runtest_setup
Enable plugin and use @fail_slow decorator to set per-test maximum duration in seconds.
# conftest.py
pytest_plugins = ['pytest_fail_slow']
# then in test
import pytest
from pytest_fail_slow import fail_slow
@fail_slow(0.5)
def test_fast_enough():
import time
time.sleep(0.1)
assert True
Upgrade
Version history
0.6.0latest on PyPI · released Jun 1, 2024
Audit
Dependencies
pytestrequiredplugin requires pytest runtime