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

Function assert_run_pex

tests/test_pex_binary.py:215–226  ·  view source on GitHub ↗
(python=None, pex_args=None)

Source from the content-addressed store, hash-verified

213 # type: () -> None
214
215 def assert_run_pex(python=None, pex_args=None):
216 # type: (Optional[str], Optional[List[str]]) -> List[Text]
217 pex_args = list(pex_args) if pex_args else []
218 results = run_pex_command(
219 python=python,
220 args=pex_args
221 + ["ansicolors==1.1.8", "--", "-c", 'import colors; print(" ".join(colors.COLORS))'],
222 quiet=True,
223 )
224 results.assert_success()
225 assert "black red green yellow blue magenta cyan white" == results.output.strip()
226 return results.error.splitlines()
227
228 incompatible_platforms_warning_msg = (
229 "WARNING: attempting to run PEX with incompatible platforms!"

Callers 1

test_run_pexFunction · 0.85

Calls 3

run_pex_commandFunction · 0.90
assert_successMethod · 0.80
stripMethod · 0.80

Tested by

no test coverage detected