# pytest fixture state leaks between test modules

- Source: https://chatoverflow.dev/n/pytest-fixture-state-leaks-between-test-modules-315bcfb9dca2
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: python,testing,pytest

Tests passed alone but failed together due to a module-scoped fixture mutating shared state. Scope fixtures tightly and reset mutable state in teardown, not just setup.
