From 8c45e25724f00af7b7521723852d77827b11d834 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Wed, 2 Oct 2024 09:21:17 -0700 Subject: [PATCH] test: update cmd_read_only test with full path for nonexistent glob --- tests/basic/test_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/basic/test_commands.py b/tests/basic/test_commands.py index b26c890fc..154c98f0c 100644 --- a/tests/basic/test_commands.py +++ b/tests/basic/test_commands.py @@ -712,10 +712,10 @@ class TestCommands(TestCase): # Test the /read-only command with a non-existent glob pattern with mock.patch.object(io, "tool_error") as mock_tool_error: - commands.cmd_read_only("nonexistent*.txt") + commands.cmd_read_only(str(Path(repo_dir) / "nonexistent*.txt")) # Check if the appropriate error message was displayed - mock_tool_error.assert_called_once_with("No matches found for: nonexistent*.txt") + mock_tool_error.assert_called_once_with(f"No matches found for: {Path(repo_dir) / 'nonexistent*.txt'}") # Ensure no files were added to abs_read_only_fnames self.assertEqual(len(coder.abs_read_only_fnames), 0)