Skip to content

Commit a08b5ed

Browse files
committed
Patch PYDANTIC_AI_HOME with tmp_path in test fixture
1 parent 526069f commit a08b5ed

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/test_cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ def _create_test_module(**namespace: Any) -> None:
5858

5959

6060
@pytest.fixture
61-
def empty_last_conversation_path():
62-
path = PYDANTIC_AI_HOME / LAST_CONVERSATION_FILENAME
61+
def empty_last_conversation_path(tmp_path, mocker):
62+
path = tmp_path / LAST_CONVERSATION_FILENAME
63+
mocker.patch('pydantic_ai._cli.PYDANTIC_AI_HOME', tmp_path)
6364

6465
if path.exists():
6566
path.unlink()

0 commit comments

Comments
 (0)