Skip to content

Commit 97300f7

Browse files
committed
clear log cache between tests
1 parent 56aff17 commit 97300f7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/conftest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ def reset_logger():
3636
set_logging_level(DEFAULT_LEVEL)
3737

3838

39+
@pytest.fixture(autouse=True)
40+
def clear_log_cache():
41+
"""Ensure log-once cache does not leak between tests."""
42+
td.log._static_cache.clear()
43+
yield
44+
45+
3946
@pytest.fixture
4047
def check_grads_with_tolerance(monkeypatch):
4148
@unary_to_nary

0 commit comments

Comments
 (0)