(tmp_path: Path, data: bytes)
| 48 | |
| 49 | |
| 50 | def _graph(tmp_path: Path, data: bytes): |
| 51 | tmp_path.mkdir(parents=True, exist_ok=True) |
| 52 | (tmp_path / "Order.cs").write_bytes(data) |
| 53 | old = os.getcwd() |
| 54 | try: |
| 55 | os.chdir(tmp_path) |
| 56 | r = extract([Path("Order.cs")], cache_root=tmp_path / ".cache") |
| 57 | finally: |
| 58 | os.chdir(old) |
| 59 | nodes = {(n["id"], n["label"]) for n in r["nodes"]} |
| 60 | edges = {(e["source"], e["target"], e["relation"]) for e in r["edges"]} |
| 61 | return nodes, edges |
| 62 | |
| 63 | |
| 64 | @pytest.mark.parametrize("encoding", list(ENCODINGS)) |
no test coverage detected