Skip to content

Commit b97dd05

Browse files
committed
Create temp directory for file client tests
1 parent 1563b7a commit b97dd05

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/conftest.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import shutil
12
from pathlib import Path
23

34
import pytest
@@ -32,7 +33,9 @@ def client(httpserver):
3233

3334

3435
@pytest.fixture
35-
def file_client():
36+
def file_client(tmp_path):
3637
'''Instance of `dicomweb_client.api.DICOMwebClient`.'''
37-
url = f'file://{DATA_ROOT}'
38+
src_dir = Path(DATA_ROOT).resolve().joinpath('test_files')
39+
shutil.copytree(src_dir, tmp_path, dirs_exist_ok=True)
40+
url = f'file://{tmp_path}'
3841
return DICOMfileClient(url, recreate_db=True, in_memory=True)

0 commit comments

Comments
 (0)