MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / _usage

Function _usage

unit-tests/test_command_prog_usage.py:24–33  ·  view source on GitHub ↗
(cmd, **kwargs)

Source from the content-addressed store, hash-verified

22
23
24def _usage(cmd, **kwargs):
25 params = MagicMock()
26 params.environment_variables = {}
27 out = io.StringIO()
28 try:
29 with redirect_stdout(out):
30 cmd.execute_args(params, '-h', **kwargs)
31 except SystemExit:
32 pass
33 return out.getvalue().splitlines()[0]
34
35
36def test_group_sub_command_keeps_its_full_name():

Calls 1

execute_argsMethod · 0.45

Tested by

no test coverage detected