mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 14:25:00 +00:00
test: update cmd_read_only test with full path for nonexistent glob
This commit is contained in:
parent
f12682a0c1
commit
8c45e25724
1 changed files with 2 additions and 2 deletions
|
@ -712,10 +712,10 @@ class TestCommands(TestCase):
|
||||||
|
|
||||||
# Test the /read-only command with a non-existent glob pattern
|
# Test the /read-only command with a non-existent glob pattern
|
||||||
with mock.patch.object(io, "tool_error") as mock_tool_error:
|
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
|
# 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
|
# Ensure no files were added to abs_read_only_fnames
|
||||||
self.assertEqual(len(coder.abs_read_only_fnames), 0)
|
self.assertEqual(len(coder.abs_read_only_fnames), 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue