(test_settings: Settings, temp_dir, agent)
| 177 | |
| 178 | |
| 179 | def test_read_file_tool_not_exist(test_settings: Settings, temp_dir, agent): |
| 180 | set_global(test_settings) |
| 181 | |
| 182 | custom_read_file_tool = ReadFileTool.create(get_curr_dir=lambda: temp_dir) |
| 183 | agent.enable_message(custom_read_file_tool) |
| 184 | task = lr.Task(agent, interactive=False, done_if_response=[lr.Entity.AGENT]) |
| 185 | nonexistent_file = "nonexistent.txt" |
| 186 | agent_result = task.run(f"Read the contents of the file '{nonexistent_file}'") |
| 187 | assert "File not found" in agent_result.content |
| 188 | |
| 189 | |
| 190 | def test_read_file_tool_multiple_files(test_settings: Settings, temp_dir, agent): |
nothing calls this directly
no test coverage detected
searching dependent graphs…