Skip to content

Commit d212d03

Browse files
Sergio SisternesCopilot
andcommitted
test: add exit_code assertions per Copilot review (#602)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b753d60 commit d212d03

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/unit/test_init_command.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,13 @@ def test_init_existing_project_confirm_uses_click(self):
255255

256256
with patch("apm_cli.commands.init.click.confirm", return_value=True) as mock_confirm:
257257
result = self.runner.invoke(cli, ["init", "--yes"])
258+
assert result.exit_code == 0
258259
# --yes skips the prompt entirely, so confirm should NOT be called
259260
mock_confirm.assert_not_called()
260261

261262
with patch("apm_cli.commands.init.click.confirm", return_value=False) as mock_confirm:
262263
result = self.runner.invoke(cli, ["init"])
264+
assert result.exit_code == 0
263265
mock_confirm.assert_called_once_with("Continue and overwrite?")
264266
assert "Initialization cancelled" in result.output
265267
finally:

0 commit comments

Comments
 (0)