MCPcopy Index your code
hub / github.com/VectifyAI/OpenKB / test_new_entity_frontmatter

Method test_new_entity_frontmatter

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

Source from the content-addressed store, hash-verified

736
737class TestWriteEntity:
738 def test_new_entity_frontmatter(self, tmp_path):
739 _write_entity(
740 tmp_path,
741 "anthropic",
742 "# Anthropic\n\nAI lab.",
743 "summaries/a.md",
744 is_update=False,
745 brief="AI lab behind Claude.",
746 type_="organization",
747 aliases=["Anthropic PBC"],
748 )
749 text = (tmp_path / "entities" / "anthropic.md").read_text(encoding="utf-8")
750 assert 'type: "Organization"' in text
751 assert 'description: "AI lab behind Claude."' in text
752 assert "sources:" in text and "summaries/a.md" in text
753 assert "Anthropic PBC" in text
754 assert text.count("---") == 2 # exactly one frontmatter block
755
756 def test_update_prepends_source_keeps_type(self, tmp_path):
757 _write_entity(

Callers

nothing calls this directly

Calls 1

_write_entityFunction · 0.90

Tested by

no test coverage detected