Skip to content

Commit 330067f

Browse files
chores: replace temporal directory (DEFAULT_CACHE_DIR) with a pytest fixture in test_client.py
1 parent 8afeab6 commit 330067f

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

tests/test_client.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
import pytest
55

66
from ontograph.client import OntoRegistryClient
7-
from ontograph.config.settings import DEFAULT_CACHE_DIR
87

98
__all__ = [
109
'client',
1110
'mock_adapter',
11+
'temp_cache_dir',
1212
'test_get_available_formats',
1313
'test_get_download_url',
1414
'test_get_ontology_metadata',
@@ -42,10 +42,16 @@ def mock_adapter():
4242
yield adapter
4343

4444

45+
@pytest.fixture
46+
def temp_cache_dir(tmp_path: Path) -> Path:
47+
"""Provide temporary directory for testing."""
48+
return tmp_path
49+
50+
4551
@pytest.fixture
4652
def client(mock_adapter):
4753
"""Fixture to create an OntoRegistryClient instance."""
48-
return OntoRegistryClient(cache_dir=Path(DEFAULT_CACHE_DIR))
54+
return OntoRegistryClient(cache_dir=Path(temp_cache_dir))
4955

5056

5157
def test_load_registry(client, mock_adapter):

0 commit comments

Comments
 (0)