diff --git a/tests/cli/test_docs.py b/tests/cli/test_docs.py index 5679a25f4..5bf466a7c 100644 --- a/tests/cli/test_docs.py +++ b/tests/cli/test_docs.py @@ -18,7 +18,7 @@ ) from pyprojroot import here from unittest.mock import patch - +import tempfile ### Evals system_prompt1 = """You are an expert in documentation management. @@ -244,8 +244,8 @@ def test_markdown_source_file_diataxis(): mock_get.return_value.status_code = 200 mock_get.return_value.text = "Mock diataxis guide content" - with pytest.tmp_path() as tmp_path: - test_file = tmp_path / "test.md" + with tempfile.TemporaryDirectory() as tmp_dir: + test_file = Path(tmp_dir) / "test.md" test_file.write_text(test_content) # Create MarkdownSourceFile instance