(self, tmp_path)
| 222 | assert "does not exist" in result.output |
| 223 | |
| 224 | def test_add_skipped_file(self, tmp_path): |
| 225 | kb_dir = self._setup_kb(tmp_path) |
| 226 | doc = tmp_path / "test.md" |
| 227 | doc.write_text("# Hello") |
| 228 | |
| 229 | from openkb.converter import ConvertResult |
| 230 | |
| 231 | mock_result = ConvertResult(skipped=True) |
| 232 | |
| 233 | runner = CliRunner() |
| 234 | with ( |
| 235 | patch("openkb.cli._find_kb_dir", return_value=kb_dir), |
| 236 | patch("openkb.cli.convert_document", return_value=mock_result), |
| 237 | patch("openkb.cli.asyncio.run") as mock_arun, |
| 238 | ): |
| 239 | result = runner.invoke(cli, ["add", str(doc)]) |
| 240 | assert "SKIP" in result.output |
| 241 | mock_arun.assert_not_called() |
| 242 | |
| 243 | def test_add_short_doc_runs_compiler(self, tmp_path): |
| 244 | kb_dir = self._setup_kb(tmp_path) |
nothing calls this directly
no test coverage detected