mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 22:34:59 +00:00
fix: Correct Columns call count assertions in io tests
This commit is contained in:
parent
bfcff84b28
commit
3ed897c665
1 changed files with 5 additions and 5 deletions
|
@ -561,7 +561,7 @@ class TestInputOutputFormatFiles(unittest.TestCase):
|
||||||
|
|
||||||
io.format_files_for_input(rel_fnames, rel_read_only_fnames)
|
io.format_files_for_input(rel_fnames, rel_read_only_fnames)
|
||||||
|
|
||||||
mock_columns.assert_called_once()
|
self.assertEqual(mock_columns.call_count, 2)
|
||||||
args, _ = mock_columns.call_args
|
args, _ = mock_columns.call_args
|
||||||
renderables = args[0]
|
renderables = args[0]
|
||||||
|
|
||||||
|
@ -589,17 +589,17 @@ class TestInputOutputFormatFiles(unittest.TestCase):
|
||||||
|
|
||||||
io.format_files_for_input(rel_fnames, rel_read_only_fnames)
|
io.format_files_for_input(rel_fnames, rel_read_only_fnames)
|
||||||
|
|
||||||
self.assertEqual(mock_columns.call_count, 2)
|
self.assertEqual(mock_columns.call_count, 4)
|
||||||
|
|
||||||
# First call for read-only files
|
# Check arguments for the first rendering of read-only files (call 0)
|
||||||
args_ro, _ = mock_columns.call_args_list[0]
|
args_ro, _ = mock_columns.call_args_list[0]
|
||||||
renderables_ro = args_ro[0]
|
renderables_ro = args_ro[0]
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
renderables_ro, [Text("Readonly:"), Text("ro1.txt"), Text("ro[markup].txt")]
|
renderables_ro, [Text("Readonly:"), Text("ro1.txt"), Text("ro[markup].txt")]
|
||||||
)
|
)
|
||||||
|
|
||||||
# Second call for editable files
|
# Check arguments for the first rendering of editable files (call 2)
|
||||||
args_ed, _ = mock_columns.call_args_list[1]
|
args_ed, _ = mock_columns.call_args_list[2]
|
||||||
renderables_ed = args_ed[0]
|
renderables_ed = args_ed[0]
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
renderables_ed, [Text("Editable:"), Text("edit1.txt"), Text("edit[markup].txt")]
|
renderables_ed, [Text("Editable:"), Text("edit1.txt"), Text("edit[markup].txt")]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue