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

Function test_pex_run

tests/test_pex.py:309–321  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

307
308
309def test_pex_run():
310 # type: () -> None
311 with named_temporary_file() as fake_stdout:
312 with temporary_dir() as temp_dir:
313 pex = write_simple_pex(
314 temp_dir,
315 'import sys; sys.stdout.write("hello"); sys.stderr.write("hello"); sys.exit(0)',
316 )
317 rc = PEX(pex.path()).run(stdin=None, stdout=fake_stdout, stderr=fake_stdout)
318 assert rc == 0
319
320 fake_stdout.seek(0)
321 assert fake_stdout.read() == b"hellohello"
322
323
324def test_pex_run_extra_sys_path():

Callers

nothing calls this directly

Calls 7

named_temporary_fileFunction · 0.90
temporary_dirFunction · 0.90
write_simple_pexFunction · 0.90
PEXClass · 0.90
runMethod · 0.45
pathMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected