{"id":24437,"library":"pytest-suite-timeout","title":"pytest-suite-timeout","description":"A pytest plugin that enforces a maximum execution time for the entire test suite, preventing runaway test runs. Version 0.1.0. Release cadence unknown (new library).","status":"active","version":"0.1.0","language":"python","source_language":"en","source_url":"https://github.com/samstav/pytest-suite-timeout","tags":["pytest","plugin","timeout","testing"],"install":[{"cmd":"pip install pytest-suite-timeout","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Required plugin hook","package":"pytest","optional":false}],"imports":[{"note":"Plugin class is exposed at package level.","wrong":"from pytest_suite_timeout.plugin import SuiteTimeoutPlugin","symbol":"SuiteTimeoutPlugin","correct":"from pytest_suite_timeout import SuiteTimeoutPlugin"}],"quickstart":{"code":"# conftest.py\nimport pytest\n\ndef pytest_addoption(parser):\n    parser.addoption('--suite-timeout', action='store', default=None, type=int,\n                     help='Maximum suite execution time in seconds')\n\ndef pytest_configure(config):\n    timeout = config.getoption('--suite-timeout')\n    if timeout:\n        from pytest_suite_timeout import SuiteTimeoutPlugin\n        config.pluginmanager.register(SuiteTimeoutPlugin(timeout))\n\n# Then run: pytest --suite-timeout=300","lang":"python","description":"Install and register the plugin via conftest.py or pytest.ini."},"warnings":[{"fix":"Set abort=True when initializing SuiteTimeoutPlugin: SuiteTimeoutPlugin(timeout, abort=True)","message":"By default, the plugin does NOT abort the suite if timeout is exceeded; it only prints a warning. Use the 'abort' option to force stop.","severity":"breaking","affected_versions":"<=0.1.0"},{"fix":"Increase timeout to account for collection time, or use --collect-only to measure collection duration.","message":"The timeout is measured from the start of the first test to the end of the last test, including collection time. If collection takes long, the timeout may trigger prematurely.","severity":"gotcha","affected_versions":"All"},{"fix":"Avoid using with xdist, or ensure the plugin runs only in the master process (if supported in future).","message":"The plugin relies on the test suite being run in a single process. Parallel execution (e.g., pytest-xdist) is not supported and may cause undefined behavior.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: pip install pytest-suite-timeout","cause":"Package not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'pytest_suite_timeout'"},{"fix":"Update package: pip install --upgrade pytest-suite-timeout, or check version if using an older release.","cause":"The 'abort' parameter was added in a later version but user has older version installed.","error":"TypeError: SuiteTimeoutPlugin() got an unexpected keyword argument 'abort'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}