From 0b820353d76a26b48f74879587badc254cd2135f Mon Sep 17 00:00:00 2001 From: sysradium Date: Thu, 13 Feb 2025 23:18:07 +0100 Subject: [PATCH] force MultiAgentsTests to dump data into tmp dir, not into repo --- tests/test_agents.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_agents.py b/tests/test_agents.py index c484b36a9..f39096dc3 100644 --- a/tests/test_agents.py +++ b/tests/test_agents.py @@ -32,7 +32,7 @@ populate_template, ) from smolagents.default_tools import DuckDuckGoSearchTool, PythonInterpreterTool, VisitWebpageTool -from smolagents.memory import PlanningStep, ActionStep +from smolagents.memory import ActionStep, PlanningStep from smolagents.models import ( ChatMessage, ChatMessageToolCall, @@ -796,6 +796,10 @@ def test_call_with_provide_run_summary(self, provide_run_summary): class MultiAgentsTests(unittest.TestCase): + @pytest.fixture(autouse=True) + def initdir(self, tmp_path, monkeypatch): + monkeypatch.chdir(tmp_path) + def test_multiagents_save(self): model = HfApiModel("Qwen/Qwen2.5-Coder-32B-Instruct", max_tokens=2096, temperature=0.5)