Resolving a .zip file extracts and returns the extract dir.
(tmp_path: Path)
| 51 | |
| 52 | |
| 53 | def 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 | |
| 70 | def test_resolve_nonexistent_raises() -> None: |
nothing calls this directly
no test coverage detected