Skip to content

chore: remove redundant pytest.mark.timeout(30) markers and add pre-commit hook #685

@Aureliolo

Description

@Aureliolo

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

  1. Remove all redundant pytest.mark.timeout(30) markers across the 299 files in tests/
  2. Keep intentional overrides -- 2 files use timeout(60) for e2e/docker tests (these are legitimate)
  3. 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 line
  • pytestmark = [pytest.mark.unit, pytest.mark.timeout(30)] -- simplify to pytestmark = pytest.mark.unit
  • pytestmark = [pytest.mark.e2e, pytest.mark.timeout(30)] -- simplify to pytestmark = pytest.mark.e2e
  • Similar list patterns with integration, etc.

Notes

  • Global setting: pyproject.toml line 231: timeout = 30
  • Non-default overrides (keep): tests/e2e/test_single_agent_e2e.py (60s), tests/integration/tools/test_docker_sandbox_integration.py (60s)

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio:lowNice to have, can deferscope:smallLess than 1 day of worktype:choreMaintenance, cleanup, dependency updatesv0.4Minor version v0.4v0.4.7Patch release v0.4.7

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions