Modify the test to check if the linter was called with a filename string whose Path().name matches the expected filename.

This commit is contained in:
Paul Gauthier (aider) 2024-07-30 10:10:39 -03:00
parent 33d9f46e25
commit b9b04052c7

View file

@ -742,7 +742,8 @@ class TestCommands(TestCase):
# Run cmd_lint # Run cmd_lint
commands.cmd_lint() commands.cmd_lint()
# Check if the linter was called with a filename string whose Path().name matches the expected filename # Check if the linter was called with a filename string
# whose Path().name matches the expected filename
mock_lint.assert_called_once() mock_lint.assert_called_once()
called_arg = mock_lint.call_args[0][0] called_arg = mock_lint.call_args[0][0]
self.assertEqual(Path(called_arg).name, filename) self.assertEqual(Path(called_arg).name, filename)