From 39fffd81d5df727ebc09717648d4cff146510f86 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 9 Aug 2024 16:59:01 -0400 Subject: [PATCH] style: Format code with linter --- tests/basic/test_commands.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/basic/test_commands.py b/tests/basic/test_commands.py index 4b7a93b0f..3e772082d 100644 --- a/tests/basic/test_commands.py +++ b/tests/basic/test_commands.py @@ -769,13 +769,25 @@ class TestCommands(TestCase): # Check if the external file was added to abs_read_only_fnames real_external_file_path = os.path.realpath(external_file_path) - self.assertTrue(any(os.path.samefile(real_external_file_path, fname) for fname in coder.abs_read_only_fnames)) + self.assertTrue( + any( + os.path.samefile(real_external_file_path, fname) + for fname in coder.abs_read_only_fnames + ) + ) # Test dropping the external read-only file - commands.cmd_drop(external_file_path) + 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.assertNotIn(real_external_file_path, coder.abs_read_only_fnames) + self.assertFalse( + any( + os.path.samefile(real_external_file_path, fname) + for fname in coder.abs_read_only_fnames + ) + ) finally: os.unlink(external_file_path)