MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / test_cycles_cli_json

Function test_cycles_cli_json

tests/test_cycles_cli.py:75–80  ·  view source on GitHub ↗
(monkeypatch, tmp_path, capsys)

Source from the content-addressed store, hash-verified

73
74
75def test_cycles_cli_json(monkeypatch, tmp_path, capsys):
76 gp = _write_cycle_graph(tmp_path)
77 _run(monkeypatch, ["graphify", "cycles", "--graph", str(gp), "--json"])
78 data = json.loads(capsys.readouterr().out)
79 assert isinstance(data, list) and len(data) == 2
80 assert data[0] == {"cycle": ["a.py", "b.py"], "length": 2, "why": "circular dependency"}
81
82
83def test_cycles_cli_distinguishes_stylesheet_import_from_self_import(monkeypatch, tmp_path, capsys):

Callers

nothing calls this directly

Calls 2

_write_cycle_graphFunction · 0.85
_runFunction · 0.70

Tested by

no test coverage detected