Skip to content

Commit 49c5ba0

Browse files
Update tests/test_remove.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 4289de9 commit 49c5ba0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/test_remove.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ def test_remove_nonexistent_project_logs_error() -> None:
9191
return_value=fake_superproject,
9292
),
9393
patch("dfetch.commands.remove.in_directory"),
94+
patch("dfetch.commands.remove.logger.print_info_line") as mocked_print_info,
9495
patch("dfetch.commands.remove.safe_rm") as mocked_safe_rm,
9596
patch("dfetch.commands.remove.shutil.copyfile") as mocked_copyfile,
9697
):
@@ -100,7 +101,9 @@ def test_remove_nonexistent_project_logs_error() -> None:
100101
fake_manifest.dump.assert_not_called()
101102
mocked_safe_rm.assert_not_called()
102103
mocked_copyfile.assert_not_called()
103-
104+
mocked_print_info.assert_called_once_with(
105+
"nonexistent", "project 'nonexistent' not found in manifest"
106+
)
104107

105108
def test_remove_with_empty_projects_list_does_nothing() -> None:
106109
"""Remove command should do nothing when no projects are specified."""

0 commit comments

Comments
 (0)