index, search, and find-related exit 1 with a friendly message when the path does not exist.
(
command: str, argv: list[str], monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str]
)
| 156 | ], |
| 157 | ) |
| 158 | def test_cli_path_not_found( |
| 159 | command: str, argv: list[str], monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str] |
| 160 | ) -> None: |
| 161 | """index, search, and find-related exit 1 with a friendly message when the path does not exist.""" |
| 162 | monkeypatch.setattr(sys, "argv", argv) |
| 163 | with patch("semble.cli._build_index", side_effect=FileNotFoundError("Path does not exist: /no/such/path")): |
| 164 | with pytest.raises(SystemExit) as exc_info: |
| 165 | _cli_main() |
| 166 | assert exc_info.value.code == 1 |
| 167 | assert "Path does not exist" in capsys.readouterr().err |
| 168 | |
| 169 | |
| 170 | def test_include_text_files_cli_deprecated( |
nothing calls this directly
no test coverage detected