(r, class_label, method_label)
| 29 | |
| 30 | |
| 31 | def _method_node_id(r, class_label, method_label): |
| 32 | class_id = _class_node_id(r, class_label) |
| 33 | node_by_id = {n["id"]: n for n in r["nodes"]} |
| 34 | for e in r["edges"]: |
| 35 | if e["relation"] == "method" and e["source"] == class_id: |
| 36 | node = node_by_id.get(e["target"]) |
| 37 | if node and node["label"] == method_label: |
| 38 | return node["id"] |
| 39 | raise AssertionError(f"no method edge {class_label}.{method_label} found") |
| 40 | |
| 41 | |
| 42 | def _has_call(r, src_id, tgt_id): |
no test coverage detected