cleanup cmd_drop test

This commit is contained in:
Paul Gauthier 2024-08-09 17:08:01 -04:00
parent e42a7caf1b
commit 57a1aafdfd
2 changed files with 2 additions and 4 deletions

View file

@ -609,13 +609,13 @@ class Commands:
filenames = parse_quoted_filenames(args)
for word in filenames:
# Handle read-only files separately
# Handle read-only files separately, without glob_filtered_to_repo
read_only_matched = [f for f in self.coder.abs_read_only_fnames if word in f]
if read_only_matched:
for matched_file in read_only_matched:
self.coder.abs_read_only_fnames.remove(matched_file)
self.io.tool_output(f"Removed read-only file {matched_file} from the chat")
continue
matched_files = self.glob_filtered_to_repo(word)

View file

@ -779,8 +779,6 @@ class TestCommands(TestCase):
# Test dropping the external read-only file
commands.cmd_drop(Path(external_file_path).name)
print(coder.abs_read_only_fnames)
# Check if the file was removed from abs_read_only_fnames
self.assertFalse(
any(