MCPcopy
hub / github.com/github/spec-kit / test_install_from_zip_nested

Method test_install_from_zip_nested

tests/test_presets.py:634–645  ·  view source on GitHub ↗

Test installing from ZIP with nested directory.

(self, project_dir, pack_dir, temp_dir)

Source from the content-addressed store, hash-verified

632 assert manager.registry.is_installed("test-pack")
633
634 def test_install_from_zip_nested(self, project_dir, pack_dir, temp_dir):
635 """Test installing from ZIP with nested directory."""
636 zip_path = temp_dir / "test-pack.zip"
637 with zipfile.ZipFile(zip_path, 'w') as zf:
638 for file_path in pack_dir.rglob('*'):
639 if file_path.is_file():
640 arcname = Path("test-pack-v1.0.0") / file_path.relative_to(pack_dir)
641 zf.write(file_path, arcname)
642
643 manager = PresetManager(project_dir)
644 manifest = manager.install_from_zip(zip_path, "0.1.5")
645 assert manifest.id == "test-pack"
646
647 def test_install_from_zip_no_manifest(self, project_dir, temp_dir):
648 """Test installing from ZIP without manifest raises error."""

Callers

nothing calls this directly

Calls 2

install_from_zipMethod · 0.95
PresetManagerClass · 0.90

Tested by

no test coverage detected