File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44import pytest
55
66from 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
4652def 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
5157def test_load_registry (client , mock_adapter ):
You can’t perform that action at this time.
0 commit comments