Skip to content

Commit b834e19

Browse files
authored
Merge pull request #1891 from booxter/use-tmpdir-in-ollama-pull-test-case
tests: generate tmpdir store for ollama pull testcase
2 parents d016126 + dd527a3 commit b834e19

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/unit/test_ollama.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import tempfile
12
from unittest.mock import patch
23

34
import pytest
@@ -14,7 +15,8 @@ def ollama_model(args: StoreArgs):
1415

1516
@pytest.fixture
1617
def args():
17-
return StoreArgs(store="/tmp/ramalama/store", engine="podman", container=True)
18+
with tempfile.TemporaryDirectory() as tmpdir:
19+
yield StoreArgs(store=tmpdir, engine="podman", container=True)
1820

1921

2022
def test_ollama_model_initialization(ollama_model):

0 commit comments

Comments
 (0)