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

Method test_skips_if_already_linked

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

Source from the content-addressed store, hash-verified

1000 assert "## Related Documents" in text
1001
1002 def test_skips_if_already_linked(self, tmp_path):
1003 wiki = tmp_path / "wiki"
1004 concepts = wiki / "concepts"
1005 concepts.mkdir(parents=True)
1006 (concepts / "attention.md").write_text(
1007 "# Attention\n\nBased on [[summaries/paper]].",
1008 encoding="utf-8",
1009 )
1010 _backlink_concepts(wiki, "paper", ["attention"])
1011 text = (concepts / "attention.md").read_text()
1012 assert text.count("[[summaries/paper]]") == 1
1013 assert "## Related Documents" not in text
1014
1015 def test_merges_into_existing_section(self, tmp_path):
1016 wiki = tmp_path / "wiki"

Callers

nothing calls this directly

Calls 1

_backlink_conceptsFunction · 0.90

Tested by

no test coverage detected