(tmp_path, files: dict[str, str], cache_root: Path | None = None)
| 28 | |
| 29 | |
| 30 | def _extract(tmp_path, files: dict[str, str], cache_root: Path | None = None): |
| 31 | for name, body in files.items(): |
| 32 | p = tmp_path / name |
| 33 | p.parent.mkdir(parents=True, exist_ok=True) |
| 34 | p.write_text(body) |
| 35 | old = os.getcwd() |
| 36 | try: |
| 37 | os.chdir(tmp_path) |
| 38 | return extract([Path(n) for n in files], cache_root=cache_root or Path(tempfile.mkdtemp())) |
| 39 | finally: |
| 40 | os.chdir(old) |
| 41 | |
| 42 | |
| 43 | def _methods(result, name: str) -> list[dict]: |
no test coverage detected