We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca1362b commit 5680790Copy full SHA for 5680790
1 file changed
packages/uipath-openai-agents/tests/conftest.py
@@ -1,3 +1,4 @@
1
+import shutil
2
import tempfile
3
from typing import Generator
4
@@ -13,6 +14,11 @@ def runner() -> CliRunner:
13
14
15
@pytest.fixture
16
def temp_dir() -> Generator[str, None, None]:
- """Provide a temporary directory for test files."""
17
- with tempfile.TemporaryDirectory() as tmp_dir:
18
- yield tmp_dir
+ """Provide a temporary directory for test files.
+
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