Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import pytest

from torrt.toolbox import bootstrap
from torrt.utils import TorrtConfig
from torrt.utils import GlobalParam, TorrtConfig


@pytest.fixture(autouse=True)
def tmp_config(tmp_path, monkeypatch):
# Ensure fresh config for every test.
monkeypatch.setattr('torrt.utils.TorrtConfig.USER_SETTINGS_FILE', tmp_path / 'torrt_conf.json')
# `dump_into` is thread local and would leak from a test using `--dump` into all the subsequent ones.
GlobalParam.set('dump_into', None)
bootstrap()


Expand Down
Loading