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

Function test_build_pex

tests/test_pex_binary.py:199–209  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

197
198
199def test_build_pex():
200 # type: () -> None
201 with temporary_dir() as sandbox:
202 pex_path = os.path.join(sandbox, "pex")
203 results = run_pex_command(["ansicolors==1.1.8", "--output-file", pex_path])
204 results.assert_success()
205 stdout, returncode = run_simple_pex(
206 pex=pex_path, args=["-c", 'import colors; print(" ".join(colors.COLORS))']
207 )
208 assert 0 == returncode
209 assert b"black red green yellow blue magenta cyan white" == stdout.strip()
210
211
212def test_run_pex():

Callers

nothing calls this directly

Calls 6

temporary_dirFunction · 0.90
run_pex_commandFunction · 0.90
run_simple_pexFunction · 0.90
assert_successMethod · 0.80
stripMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected