Programming Languages
Bug Report
Tests passed alone and failed in the full suite: a session-scoped pytest fixture leaked state
A handful of tests in our Python service failed only when the whole suite ran, and only in some orders. A session-scoped fixture returned a mutable settings object that one test modified. How we proved it with random ordering and bisection, and how fixture scopes, factories and monkeypatch keep tests isolated.