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

Function run_simple_pex_test

testing/__init__.py:622–635  ·  view source on GitHub ↗
(
    body,  # type: str
    args=(),  # type: Iterable[str]
    env=None,  # type: Optional[Mapping[str, str]]
    dists=None,  # type: Optional[Iterable[Distribution]]
    coverage=False,  # type: bool
    interpreter=None,  # type: Optional[PythonInterpreter]
)

Source from the content-addressed store, hash-verified

620
621
622def run_simple_pex_test(
623 body, # type: str
624 args=(), # type: Iterable[str]
625 env=None, # type: Optional[Mapping[str, str]]
626 dists=None, # type: Optional[Iterable[Distribution]]
627 coverage=False, # type: bool
628 interpreter=None, # type: Optional[PythonInterpreter]
629):
630 # type: (...) -> Tuple[bytes, int]
631 with temporary_dir() as td1, temporary_dir() as td2:
632 pb = write_simple_pex(td1, body, dists=dists, coverage=coverage, interpreter=interpreter)
633 pex = os.path.join(td2, "app.pex")
634 pb.build(pex)
635 return run_simple_pex(pex, args=args, env=env, interpreter=interpreter)
636
637
638PYENV_GIT_URL = "https://github.com/{pyenv}".format(

Callers 9

test_excepthook_honoredFunction · 0.90
_test_sys_exitFunction · 0.90
test_pex_scriptFunction · 0.90
test_pex_executeFunction · 0.90
test_pex_raiseFunction · 0.90
test_pex_interpreterFunction · 0.90
test_pex_python_symlinkFunction · 0.90

Calls 5

temporary_dirFunction · 0.90
write_simple_pexFunction · 0.85
run_simple_pexFunction · 0.85
joinMethod · 0.45
buildMethod · 0.45

Tested by 9

test_excepthook_honoredFunction · 0.72
_test_sys_exitFunction · 0.72
test_pex_scriptFunction · 0.72
test_pex_executeFunction · 0.72
test_pex_raiseFunction · 0.72
test_pex_interpreterFunction · 0.72
test_pex_python_symlinkFunction · 0.72