(tmp_path: Path, name: str, src: str)
| 32 | |
| 33 | |
| 34 | def _graph(tmp_path: Path, name: str, src: str): |
| 35 | path = tmp_path / name |
| 36 | path.write_text(src, encoding="utf-8") |
| 37 | result = extract_sql(path) |
| 38 | labels = sorted(n["label"] for n in result["nodes"] if n["label"] != name) |
| 39 | edges = sorted( |
| 40 | (e["relation"], e["target"]) |
| 41 | for e in result["edges"] |
| 42 | if e["relation"] != "contains" |
| 43 | ) |
| 44 | return labels, edges |
| 45 | |
| 46 | |
| 47 | @pytest.mark.parametrize( |
no test coverage detected