2026-05-306 min read
monkeypatch lies to you when your tests run in subprocesses
The fixture looked correct. The patch was applied. The subprocess ignored all of it and wrote to the real registry. Three days of roadmap work taught me that monkeypatch only rebinds the parent process — env-var overrides are the only isolation that survives a fork.
Read post→