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

Function test_path_directed_deterministic

tests/test_cli_export.py:549–565  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

547
548
549def test_path_directed_deterministic(tmp_path):
550 # Diamond with two equal-length directed routes: the chosen route must not
551 # depend on the process hash seed (#2074 discipline for the digraph too).
552 _write_path_graph(
553 tmp_path, ["start", "left", "right", "goal"],
554 [_calls("start", "left"), _calls("left", "goal"),
555 _calls("start", "right"), _calls("right", "goal")],
556 )
557 outputs = []
558 for seed in ("0", "1"):
559 env = os.environ.copy()
560 env["PYTHONHASHSEED"] = seed
561 r = _run(["path", "start", "goal"], tmp_path, env=env)
562 assert r.returncode == 0, r.stderr
563 assert "-->" in r.stdout
564 outputs.append(r.stdout)
565 assert outputs[0] == outputs[1]
566
567
568def test_path_flags_mutually_exclusive(tmp_path):

Callers

nothing calls this directly

Calls 3

_write_path_graphFunction · 0.85
_callsFunction · 0.70
_runFunction · 0.70

Tested by

no test coverage detected