(tool_input, cwd, *, graph: bool)
| 29 | |
| 30 | |
| 31 | def _run(tool_input, cwd, *, graph: bool): |
| 32 | if graph: |
| 33 | (cwd / "graphify-out").mkdir(parents=True, exist_ok=True) |
| 34 | (cwd / "graphify-out" / "graph.json").write_text("{}", encoding="utf-8") |
| 35 | stdin = json.dumps({"tool_input": tool_input}) |
| 36 | return subprocess.run( |
| 37 | [sys.executable, "-m", "graphify", "hook-guard", "read"], |
| 38 | input=stdin, capture_output=True, text=True, cwd=cwd, env=_env(), |
| 39 | ) |
| 40 | |
| 41 | |
| 42 | def test_matcher_targets_read_and_glob(): |
no test coverage detected