MCPcopy Index your code
hub / github.com/github/spec-kit / test_persistence

Method test_persistence

tests/test_presets.py:379–390  ·  view source on GitHub ↗

Test that registry data persists across instances.

(self, temp_dir)

Source from the content-addressed store, hash-verified

377 assert "pack-b" in all_packs
378
379 def test_persistence(self, temp_dir):
380 """Test that registry data persists across instances."""
381 packs_dir = temp_dir / "packs"
382 packs_dir.mkdir()
383
384 # Add with first instance
385 registry1 = PresetRegistry(packs_dir)
386 registry1.add("test-pack", {"version": "1.0.0"})
387
388 # Load with second instance
389 registry2 = PresetRegistry(packs_dir)
390 assert registry2.is_installed("test-pack")
391
392 def test_corrupted_registry(self, temp_dir):
393 """Test recovery from corrupted registry file."""

Callers

nothing calls this directly

Calls 3

addMethod · 0.95
is_installedMethod · 0.95
PresetRegistryClass · 0.90

Tested by

no test coverage detected