Skip to content

pytest wall time regressed from ~2min to ~20min #469

@FidoCanCode

Description

@FidoCanCode

The pytest suite used to complete in roughly 2 minutes and now takes around 20 minutes. That 10x regression is the dominant stall in fido's edit-test loop — every review-thread fix that touches code has to wait through a full run before it can commit.

Likely culprit: tests added in PR #456 (persistent claude stream) for subprocess / async lifecycle, where real sleep / real subprocess.Popen / retry loops with generous timeouts add wall time even when the logic under test is fast.

Work:

  1. Run uv run pytest --durations=30 (or profile via pytest-durations) on the current tip to identify the slowest tests.
  2. For each slow test, replace real-time waits with monkeypatch/freezegun/mocked subprocess streams; cut any fixture that does real I/O it doesn't need.
  3. Target: back under 2 minutes, ideally with headroom that survives more tests being added.

Related: #467 tracks running pytest in parallel via pytest-xdist, which compounds with this fix but isn't a substitute — a single 15-minute test will still stall a worker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions