From 0a795ad982bdf0a3735752120844af70ae1b3403 Mon Sep 17 00:00:00 2001 From: hermes Date: Mon, 23 Mar 2026 22:55:49 -0400 Subject: [PATCH] fix: use thread timeout method for xdist compatibility (#1336) pytest-timeout signal method is unreliable under xdist --dist worksteal. Workers inherit the signal handler but scheduling overhead (not test code) inflates wall-clock time past the 30s limit. Changes: - timeout_method: signal -> thread (xdist-safe) - timeout_func_only: false -> true (measure test body, not xdist overhead) 842 tests pass, 0 failures. Sovereignty tests drop from 67s to 0.3s. --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index eb0b8acf..ff149beb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -99,8 +99,8 @@ pythonpath = ["src", "tests"] asyncio_mode = "auto" asyncio_default_fixture_loop_scope = "function" timeout = 30 -timeout_method = "signal" -timeout_func_only = false +timeout_method = "thread" +timeout_func_only = true addopts = "-v --tb=short --strict-markers --disable-warnings --durations=10 --cov-fail-under=60" markers = [ "unit: Unit tests (fast, no I/O)", -- 2.43.0