MCPcopy
hub / github.com/pex-tool/pex / test_pex_tools_script

Function test_pex_tools_script

tests/test_packaging.py:43–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41
42
43def test_pex_tools_script():
44 # type: () -> None
45 command_names = ",".join([command_type.name() for command_type in all_commands()])
46 expected_first_line = "usage: pex-tools [-h] [-V] PATH {{{command_names}}} ...".format(
47 command_names=command_names
48 )
49
50 # Make sure we don't word-wrap for simplicity of testing.
51 env = make_env(COLUMNS=len(expected_first_line) + 2)
52
53 output = subprocess.check_output(args=[script_path("pex-tools"), "-h"], env=env)
54 first_line = output.decode("utf-8").splitlines()[0]
55 assert expected_first_line == first_line, output.decode("utf-8")

Callers

nothing calls this directly

Calls 6

all_commandsFunction · 0.90
make_envFunction · 0.90
script_pathFunction · 0.85
decodeMethod · 0.80
joinMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected