()
| 41 | |
| 42 | |
| 43 | def 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") |
nothing calls this directly
no test coverage detected