Write a synthetic theme (always with layout/theme.liquid) and return its root.
(tmp_path: Path, files: dict[str, str])
| 25 | |
| 26 | |
| 27 | def _theme(tmp_path: Path, files: dict[str, str]) -> Path: |
| 28 | """Write a synthetic theme (always with layout/theme.liquid) and return its root.""" |
| 29 | root = tmp_path / "theme" |
| 30 | root.mkdir() |
| 31 | base = {"layout/theme.liquid": "{{ content_for_layout }}\n"} |
| 32 | for rel, body in {**base, **files}.items(): |
| 33 | p = root / rel |
| 34 | p.parent.mkdir(parents=True, exist_ok=True) |
| 35 | p.write_text(body, encoding="utf-8") |
| 36 | return root |
| 37 | |
| 38 | |
| 39 | def _edges(root: Path, rel: str) -> list[dict]: |
no test coverage detected