MCPcopy Create free account
hub / github.com/OpenAssetIO/OpenAssetIO / execute_cli

Function execute_cli

examples/host/simpleResolver/test_simpleResolver.py:99–109  ·  view source on GitHub ↗

Executes simplerResolver with the supplied args, as per subprocess.run.

(*args)

Source from the content-addressed store, hash-verified

97
98
99def execute_cli(*args):
100 """
101 Executes simplerResolver with the supplied args, as per subprocess.run.
102 """
103 this_file = pathlib.Path(__file__)
104 cli_path = this_file.parent / "simpleResolver.py"
105 all_args = [sys.executable, str(cli_path)]
106 all_args.extend(args)
107 # We explicitly don't want an exception to be raised.
108 # pylint: disable=subprocess-run-check
109 return subprocess.run(all_args, capture_output=True, encoding="utf-8")
110
111
112@pytest.fixture

Calls

no outgoing calls

Tested by

no test coverage detected