Skip to content

Commit 125299e

Browse files
authored
tests: clear the registry (#968)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent 150b546 commit 125299e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ def reset_color_envvars(monkeypatch: pytest.MonkeyPatch) -> None:
2828
monkeypatch.delenv("NO_COLOR", raising=False)
2929

3030

31+
@pytest.fixture(autouse=True)
32+
def clear_cache(monkeypatch: pytest.MonkeyPatch) -> None:
33+
"""Clear the cache for each test."""
34+
monkeypatch.setattr("nox.registry._REGISTRY", {})
35+
36+
3137
RESOURCES = Path(__file__).parent.joinpath("resources")
3238

3339

0 commit comments

Comments
 (0)