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

Method test_skips_already_linked

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

Source from the content-addressed store, hash-verified

925 assert "[[concepts/transformer]]" in text
926
927 def test_skips_already_linked(self, tmp_path):
928 wiki = tmp_path / "wiki"
929 summaries = wiki / "summaries"
930 summaries.mkdir(parents=True)
931 (summaries / "paper.md").write_text(
932 "---\nsources: [paper.pdf]\n---\n\n# Summary\n\nSee [[concepts/attention]].",
933 encoding="utf-8",
934 )
935 _backlink_summary(wiki, "paper", ["attention", "transformer"])
936 text = (summaries / "paper.md").read_text()
937 # attention already linked, should not duplicate
938 assert text.count("[[concepts/attention]]") == 1
939 # transformer should be added
940 assert "[[concepts/transformer]]" in text
941
942 def test_no_op_when_all_linked(self, tmp_path):
943 wiki = tmp_path / "wiki"

Callers

nothing calls this directly

Calls 1

_backlink_summaryFunction · 0.90

Tested by

no test coverage detected