From d7cf0d5d2b58ba71400adf38fbb270ae1b830f5b Mon Sep 17 00:00:00 2001 From: Stacy Olivas Date: Fri, 10 Apr 2026 07:21:35 -0700 Subject: [PATCH] fix: add per-test timeout to pytest.ini to prevent CI hangs pytest.ini takes precedence over pyproject.toml [tool.pytest.ini_options] so the timeout = 30 setting there was silently ignored. Add timeout = 30 and timeout_method = thread directly to pytest.ini so blocking tests are killed after 30 s in CI. --- pytest.ini | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pytest.ini b/pytest.ini index 83e03ee..961002a 100644 --- a/pytest.ini +++ b/pytest.ini @@ -12,6 +12,11 @@ testpaths = tests # Async test support asyncio_mode = auto +# Per-test timeout — prevents blocking I/O or infinite loops from hanging CI. +# Tests that legitimately need longer can use @pytest.mark.timeout(N). +timeout = 30 +timeout_method = thread + # Coverage configuration (optional) # [tool:pytest] # addopts = --cov=modules --cov-report=html --cov-report=term-missing