(
root: Path,
files: dict[str, str],
cargo_toml: str | None = None,
)
| 8 | |
| 9 | |
| 10 | def _write_fixture( |
| 11 | root: Path, |
| 12 | files: dict[str, str], |
| 13 | cargo_toml: str | None = None, |
| 14 | ) -> None: |
| 15 | if cargo_toml is not None: |
| 16 | (root / "Cargo.toml").write_text(cargo_toml, encoding="utf-8") |
| 17 | for relative, body in files.items(): |
| 18 | path = root / relative |
| 19 | path.parent.mkdir(parents=True, exist_ok=True) |
| 20 | path.write_text(body, encoding="utf-8") |
| 21 | |
| 22 | |
| 23 | def _extract_fixture( |
no test coverage detected