(tmp_path, files: dict[str, str])
| 17 | |
| 18 | |
| 19 | def _calls(tmp_path, files: dict[str, str]): |
| 20 | for name, body in files.items(): |
| 21 | (tmp_path / name).write_text(body) |
| 22 | old = os.getcwd() |
| 23 | try: |
| 24 | os.chdir(tmp_path) |
| 25 | r = extract([Path(n) for n in files], cache_root=tmp_path / ".cache") |
| 26 | finally: |
| 27 | os.chdir(old) |
| 28 | calls = {(e["source"], e["target"]) for e in r["edges"] if e["relation"] == "calls"} |
| 29 | return calls, r |
| 30 | |
| 31 | |
| 32 | def _find(r, label, id_contains): |
no test coverage detected