-
Notifications
You must be signed in to change notification settings - Fork 0
chore: remove redundant pytest.mark.timeout(30) markers and add pre-commit hook #685
Copy link
Copy link
Closed
Labels
prio:lowNice to have, can deferNice to have, can deferscope:smallLess than 1 day of workLess than 1 day of worktype:choreMaintenance, cleanup, dependency updatesMaintenance, cleanup, dependency updatesv0.4Minor version v0.4Minor version v0.4v0.4.7Patch release v0.4.7Patch release v0.4.7
Description
Problem
pyproject.toml sets timeout = 30 globally for all tests (line 231). Despite this, 299 test files redundantly apply pytest.mark.timeout(30) at module or class level. These markers have no effect and add noise.
Proposed solution
- Remove all redundant
pytest.mark.timeout(30)markers across the 299 files intests/ - Keep intentional overrides -- 2 files use
timeout(60)for e2e/docker tests (these are legitimate) - Add a pre-commit hook (or ruff rule) to prevent re-introduction of
pytest.mark.timeout(30)since it matches the global default
Patterns to handle
pytestmark = pytest.mark.timeout(30)-- remove entire linepytestmark = [pytest.mark.unit, pytest.mark.timeout(30)]-- simplify topytestmark = pytest.mark.unitpytestmark = [pytest.mark.e2e, pytest.mark.timeout(30)]-- simplify topytestmark = pytest.mark.e2e- Similar list patterns with
integration, etc.
Notes
- Global setting:
pyproject.tomlline 231:timeout = 30 - Non-default overrides (keep):
tests/e2e/test_single_agent_e2e.py(60s),tests/integration/tools/test_docker_sandbox_integration.py(60s)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
prio:lowNice to have, can deferNice to have, can deferscope:smallLess than 1 day of workLess than 1 day of worktype:choreMaintenance, cleanup, dependency updatesMaintenance, cleanup, dependency updatesv0.4Minor version v0.4Minor version v0.4v0.4.7Patch release v0.4.7Patch release v0.4.7