Run exits when the user declines the confirmation prompt.
(run_setup, monkeypatch)
| 403 | |
| 404 | |
| 405 | def test_run_cancels(run_setup, monkeypatch): |
| 406 | """Run exits when the user declines the confirmation prompt.""" |
| 407 | |
| 408 | class _No: |
| 409 | def ask(self): |
| 410 | return False |
| 411 | |
| 412 | monkeypatch.setattr("semble.installer.installer.questionary.confirm", lambda *_, **__: _No()) |
| 413 | with pytest.raises(SystemExit): |
| 414 | run("install") |
| 415 | |
| 416 | |
| 417 | @pytest.mark.parametrize( |