(tmp_path, files: dict[str, str])
| 19 | |
| 20 | |
| 21 | def _extract(tmp_path, files: dict[str, str]): |
| 22 | for name, body in files.items(): |
| 23 | p = tmp_path / name |
| 24 | p.parent.mkdir(parents=True, exist_ok=True) |
| 25 | p.write_text(body) |
| 26 | old = os.getcwd() |
| 27 | try: |
| 28 | os.chdir(tmp_path) |
| 29 | r = extract([Path(n) for n in files], cache_root=tmp_path / ".cache") |
| 30 | finally: |
| 31 | os.chdir(old) |
| 32 | calls = {(e["source"], e["target"]) for e in r["edges"] if e["relation"] == "calls"} |
| 33 | return calls, r |
| 34 | |
| 35 | |
| 36 | def _nodes_labeled(r, label): |
no test coverage detected