MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / run_cli

Function run_cli

tests/test_usage_modes.py:39–56  ·  view source on GitHub ↗
(
    args: list[str],
    *,
    env: dict[str, str] | None = None,
    input_text: str | None = None,
)

Source from the content-addressed store, hash-verified

37
38
39def run_cli(
40 args: list[str],
41 *,
42 env: dict[str, str] | None = None,
43 input_text: str | None = None,
44) -> subprocess.CompletedProcess[str]:
45 merged_env = dict(os.environ)
46 merged_env["PYTHONPATH"] = str(PACKAGE_ROOT)
47 if env:
48 merged_env.update(env)
49 return subprocess.run(
50 [*CLI_MODULE, *args],
51 capture_output=True,
52 text=True,
53 input=input_text,
54 cwd=PACKAGE_ROOT,
55 env=merged_env,
56 )
57
58
59# ── Fixtures ─────────────────────────────────────────────────────────

Callers 15

test_versionMethod · 0.85
test_helpMethod · 0.85
test_route_textMethod · 0.85
test_route_jsonMethod · 0.85
test_route_mode_flagMethod · 0.85
test_debugMethod · 0.85

Calls 2

runMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected