(self, tmp_path)
| 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" |
nothing calls this directly
no test coverage detected