diff --git a/tests/basic/test_commands.py b/tests/basic/test_commands.py index 2ca71af31..948db1517 100644 --- a/tests/basic/test_commands.py +++ b/tests/basic/test_commands.py @@ -721,12 +721,18 @@ class TestCommands(TestCase): # Mock the linter.lint method with mock.patch.object(coder.linter, "lint") as mock_lint: + # Set up the mock to return an empty string (no lint errors) + mock_lint.return_value = "" + # Run cmd_lint commands.cmd_lint() # Check if the linter was called with the dirty file mock_lint.assert_called_once_with(filename) + # Verify that the file is still dirty after linting + self.assertTrue(repo.is_dirty(filename)) + del coder del commands del repo