We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent feb53db commit cbcf09fCopy full SHA for cbcf09f
1 file changed
tests/conftest.py
@@ -1,7 +1,10 @@
1
from __future__ import annotations
2
3
import typing as t
4
+from pathlib import Path
5
from shutil import rmtree
6
+from tempfile import TemporaryDirectory
7
+from unittest import mock
8
9
import duckdb
10
import pytest
@@ -19,6 +22,15 @@
19
22
pytest_plugins = ["tests.common_fixtures"]
20
23
21
24
25
+# Ignore all local config files
26
+@pytest.fixture(scope="session", autouse=True)
27
+def ignore_local_config_files():
28
+ mock_home = mock.Mock()
29
+ mock_home.return_value = Path(TemporaryDirectory().name)
30
+ with mock.patch("pathlib.Path.home", mock_home):
31
+ yield
32
+
33
34
@pytest.fixture
35
def context(tmpdir) -> Context:
36
return Context(paths=str(tmpdir))
0 commit comments