(tmp_path: Path, src: str, name: str = "pkg.sql")
| 54 | |
| 55 | |
| 56 | def _graph(tmp_path: Path, src: str, name: str = "pkg.sql"): |
| 57 | path = tmp_path / name |
| 58 | path.write_text(src, encoding="utf-8") |
| 59 | result = extract_sql(path) |
| 60 | label = {n["id"]: n["label"] for n in result["nodes"]} |
| 61 | line = {n["label"]: n["source_location"] for n in result["nodes"]} |
| 62 | edges = sorted( |
| 63 | (label[e["source"]], e["relation"], label[e["target"]]) for e in result["edges"] |
| 64 | ) |
| 65 | return line, edges |
| 66 | |
| 67 | |
| 68 | def test_package_body_members_and_their_tables(tmp_path): |
no test coverage detected