Skip to content

Commit 5680790

Browse files
committed
fix: test
1 parent ca1362b commit 5680790

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

packages/uipath-openai-agents/tests/conftest.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import shutil
12
import tempfile
23
from typing import Generator
34

@@ -13,6 +14,11 @@ def runner() -> CliRunner:
1314

1415
@pytest.fixture
1516
def temp_dir() -> Generator[str, None, None]:
16-
"""Provide a temporary directory for test files."""
17-
with tempfile.TemporaryDirectory() as tmp_dir:
18-
yield tmp_dir
17+
"""Provide a temporary directory for test files.
18+
19+
Cleanup ignores errors to avoid PermissionError on Windows when
20+
SQLiteSession worker-thread connections still hold the state.db file open.
21+
"""
22+
tmp_dir = tempfile.mkdtemp()
23+
yield tmp_dir
24+
shutil.rmtree(tmp_dir, ignore_errors=True)

0 commit comments

Comments
 (0)