Create a minimal KB structure.
(self, tmp_path)
| 43 | |
| 44 | class TestAddCommand: |
| 45 | def _setup_kb(self, tmp_path): |
| 46 | """Create a minimal KB structure.""" |
| 47 | (tmp_path / "raw").mkdir() |
| 48 | (tmp_path / "wiki" / "sources" / "images").mkdir(parents=True) |
| 49 | (tmp_path / "wiki" / "summaries").mkdir(parents=True) |
| 50 | (tmp_path / "wiki" / "concepts").mkdir(parents=True) |
| 51 | (tmp_path / "wiki" / "reports").mkdir(parents=True) |
| 52 | openkb_dir = tmp_path / ".openkb" |
| 53 | openkb_dir.mkdir() |
| 54 | (openkb_dir / "config.yaml").write_text("model: gpt-4o-mini\n") |
| 55 | (openkb_dir / "hashes.json").write_text(json.dumps({})) |
| 56 | return tmp_path |
| 57 | |
| 58 | def test_add_missing_init(self, tmp_path): |
| 59 | runner = CliRunner() |
no outgoing calls
no test coverage detected