Add versioned independent projection contracts
This commit is contained in:
parent
4c5773c865
commit
96e3965855
22 changed files with 3561 additions and 133 deletions
|
|
@ -386,6 +386,25 @@ class VisualizationTests(unittest.TestCase):
|
|||
with self.assertRaisesRegex(DocForgeError, "category is unsupported"):
|
||||
snapshot.filter_nodes(category="relation", value="depends_on", limit=2)
|
||||
|
||||
def test_snapshot_source_never_mixes_pinned_graph_with_newer_canonical_text(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
root = self.copy_fixture("alpha", Path(directory))
|
||||
index = ProjectIndex(Project.open(root))
|
||||
index.build()
|
||||
snapshot = VisualizationIndexSnapshot(index, index.check())
|
||||
before = snapshot.source("guide.workflow")
|
||||
|
||||
source = root / "docs/content/workflow.md"
|
||||
source.write_text(
|
||||
source.read_text(encoding="utf-8") + "\nNewer unindexed source text.\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
after = snapshot.source("guide.workflow")
|
||||
|
||||
self.assertEqual(before["content"], after["content"])
|
||||
self.assertNotIn("Newer unindexed source text", after["content"])
|
||||
self.assertEqual("index_snapshot", after["source_provenance"])
|
||||
|
||||
def test_flow_reverses_imports_into_a_complete_structural_path(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
root = self.copy_fixture("alpha", Path(directory))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue