MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / test_appends_entries_with_briefs

Method test_appends_entries_with_briefs

tests/test_compiler.py:379–396  ·  view source on GitHub ↗
(self, tmp_path)

Source from the content-addressed store, hash-verified

377
378class TestUpdateIndex:
379 def test_appends_entries_with_briefs(self, tmp_path):
380 wiki = tmp_path / "wiki"
381 wiki.mkdir()
382 (wiki / "index.md").write_text(
383 "# Index\n\n## Documents\n\n## Concepts\n\n## Explorations\n",
384 encoding="utf-8",
385 )
386 _update_index(
387 wiki,
388 "my-doc",
389 ["attention", "transformer"],
390 doc_brief="Introduces transformers",
391 concept_briefs={"attention": "Focus mechanism", "transformer": "NN architecture"},
392 )
393 text = (wiki / "index.md").read_text()
394 assert "[[summaries/my-doc]] (short) — Introduces transformers" in text
395 assert "[[concepts/attention]] — Focus mechanism" in text
396 assert "[[concepts/transformer]] — NN architecture" in text
397
398 def test_updates_only_exact_concept_row(self, tmp_path):
399 wiki = tmp_path / "wiki"

Callers

nothing calls this directly

Calls 1

_update_indexFunction · 0.90

Tested by

no test coverage detected