--- id: pytest-timeouts version: "1.2.1" license: MIT license license_treatment: permissive maintenance: abandoned --- # pytest-timeouts — Linux-only Pytest plugin to control durations of various test case execution phases License: permissive · Maintenance: abandoned · Downloads: 3.7M/mo ## What it is and what it does pytest-timeouts is a pytest plugin that lets you set independent timeout limits for the setup, execution, and teardown phases of a test case. Unlike generic test timeouts, it breaks down test lifecycle into three stages and allows you to control each one separately via command-line options, pytest.ini configuration, or per-test markers. It uses SIGALRM signals to enforce these limits and disables timeouts when running under a debugger. The plugin is Linux-only and has been abandoned since 2019 with no active maintenance. It supports Python 2.7 and Python 3.4 and later, but has not been updated to track changes in pytest or Python's evolution. If you need phase-level timeout control on Linux and can accept the risk of an unmaintained dependency, it may still work; otherwise, consider whether a more actively maintained timeout solution fits your needs. Use it for: - Enforce maximum duration for test setup operations (database connections, fixture initialization) separately from the test body. - Catch tests that hang during teardown (resource cleanup) without timing out the actual test execution. - Set different timeout thresholds for slow integration tests versus fast unit tests using pytest markers. - Debug test hangs by disabling timeouts when running under PDB without removing timeout configuration. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A pytest plugin that enforces separate timeout limits on the setup, execution, and teardown phases of individual tests using SIGALRM signals on Linux. No, unless you have a specific Linux-only use case that requires phase-level timeout control and can tolerate an unmaintained package. The plugin has not been updated since 2019, and there is no active maintenance or security support. For most projects, a maintained timeout plugin or pytest's built-in timeout mechanisms are safer choices. ## Install pip install pytest-timeouts uv add pytest-timeouts poetry add pytest-timeouts ## Installing pytest-timeouts Before you install: High install friction: the package is abandoned (last commit 2019-12-30, 2519 days ago) and has not been updated since its 1.2.1 release in 2019-09-21. No active maintenance or security updates are available. License in practice: MIT license is permissive and poses no redistribution restrictions, but the abandoned maintenance status means no license updates or clarifications will be forthcoming. Quickstart: pip install pytest-timeouts # In pytest.ini: [pytest] setup_timeout = 2.5 execution_timeout = 2.01 teardown_timeout = 0 # Or via command line: pytest --setup-timeout 2.5 --execution-timeout 2.01 --teardown-timeout 0 Linux only; uses SIGALRM signal which is not available on Windows or macOS. Requires Python 2.7 or Python 3.4+. Verify before relying: - Whether the plugin works reliably with modern pytest versions (last tested in 2019) - Compatibility with current Python 3.x minor versions beyond what the classifier states - Whether SIGALRM-based timeout handling conflicts with async test frameworks or other signal-using libraries ## Package facts - License: MIT license (permissive) - Python support: supports_current - Install friction: high - Maintenance: abandoned - Downloads: 3.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags pytest phase timeout control, test setup execution teardown timeout, linux pytest signal alarm, per-phase test duration limits, pytest test lifecycle timeout, linux-only, abandoned [View on SkillFed](https://skillfed.io/packages/pytest-timeouts) · [View on PyPI](https://pypi.org/project/pytest-timeouts/)