(tmp_path: Path, files: dict[str, str])
| 40 | |
| 41 | |
| 42 | def _extract(tmp_path: Path, files: dict[str, str]): |
| 43 | (tmp_path / "go.mod").write_text(_GO_MOD) |
| 44 | for name, body in files.items(): |
| 45 | p = tmp_path / name |
| 46 | p.parent.mkdir(parents=True, exist_ok=True) |
| 47 | p.write_text(body) |
| 48 | r = extract( |
| 49 | sorted(tmp_path / n for n in files), |
| 50 | cache_root=tmp_path / "cache", |
| 51 | root=tmp_path, |
| 52 | parallel=False, |
| 53 | ) |
| 54 | dispatch = {(e["source"], e["target"]) for e in r["edges"] |
| 55 | if e["relation"] == "dispatches_to"} |
| 56 | return dispatch, r |
| 57 | |
| 58 | |
| 59 | def _find(r, label, id_contains): |
no test coverage detected