MCPcopy Create free account
hub / github.com/NVIDIA/SkillSpector / test_resolve_zip_file

Function test_resolve_zip_file

tests/unit/test_input_handler.py:53–67  ·  view source on GitHub ↗

Resolving a .zip file extracts and returns the extract dir.

(tmp_path: Path)

Source from the content-addressed store, hash-verified

51
52
53def test_resolve_zip_file(tmp_path: Path) -> None:
54 """Resolving a .zip file extracts and returns the extract dir."""
55 import zipfile
56
57 (tmp_path / "SKILL.md").write_text("# Skill", encoding="utf-8")
58 zip_path = tmp_path / "skill.zip"
59 with zipfile.ZipFile(zip_path, "w") as zf:
60 zf.write(tmp_path / "SKILL.md", "SKILL.md")
61 handler = InputHandler()
62 try:
63 resolved, source_type = handler.resolve(str(zip_path))
64 assert resolved.is_dir()
65 assert source_type == "zip"
66 finally:
67 handler.cleanup()
68
69
70def test_resolve_nonexistent_raises() -> None:

Callers

nothing calls this directly

Calls 3

resolveMethod · 0.95
cleanupMethod · 0.95
InputHandlerClass · 0.90

Tested by

no test coverage detected