Skip to content

Commit

Permalink
fix: Rename cmd_read to cmd_read_only
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-gauthier committed Aug 19, 2024
1 parent 076db26 commit f9471fc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/basic/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ def test_cmd_add_read_only_file(self):
test_file.write_text("Test content")

# Add the file as read-only
commands.cmd_read(str(test_file))
commands.cmd_read_only(str(test_file))

# Verify it's in abs_read_only_fnames
self.assertTrue(
Expand Down Expand Up @@ -787,7 +787,7 @@ def test_cmd_add_aiderignored_file(self):
self.assertNotIn(fname2, str(coder.abs_fnames))
self.assertNotIn(fname3, str(coder.abs_fnames))

def test_cmd_read(self):
def test_cmd_read_only(self):
with GitTemporaryDirectory():
io = InputOutput(pretty=False, yes=False)
coder = Coder.create(self.GPT35, None, io)
Expand All @@ -798,7 +798,7 @@ def test_cmd_read(self):
test_file.write_text("Test content")

# Test the /read command
commands.cmd_read(str(test_file))
commands.cmd_read_only(str(test_file))

# Check if the file was added to abs_read_only_fnames
self.assertTrue(
Expand All @@ -819,7 +819,7 @@ def test_cmd_read(self):
)
)

def test_cmd_read_with_external_file(self):
def test_cmd_read_only_with_external_file(self):
with tempfile.NamedTemporaryFile(mode="w", delete=False) as external_file:
external_file.write("External file content")
external_file_path = external_file.name
Expand All @@ -831,7 +831,7 @@ def test_cmd_read_with_external_file(self):
commands = Commands(io, coder)

# Test the /read command with an external file
commands.cmd_read(external_file_path)
commands.cmd_read_only(external_file_path)

# Check if the external file was added to abs_read_only_fnames
real_external_file_path = os.path.realpath(external_file_path)
Expand Down

0 comments on commit f9471fc

Please sign in to comment.