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

Function create_pex_venv

tests/tools/commands/test_venv.py:97–112  ·  view source on GitHub ↗
(
    tmpdir,  # type: Tempdir
    pex,  # type: str
)

Source from the content-addressed store, hash-verified

95
96@pytest.fixture
97def create_pex_venv(
98 tmpdir, # type: Tempdir
99 pex, # type: str
100):
101 # type: (...) -> Iterator[CreatePexVenv]
102
103 venv_dir = tmpdir.join("venv")
104
105 def _create_pex_venv(*options):
106 # type: (*str) -> Virtualenv
107 subprocess.check_call(
108 args=[pex, "venv", venv_dir] + list(options or ()), env=make_env(PEX_TOOLS="1")
109 )
110 return Virtualenv(venv_dir)
111
112 yield _create_pex_venv
113
114
115def test_force(create_pex_venv):

Callers 5

test_forceFunction · 0.85
test_venv_pexFunction · 0.85
test_binary_pathFunction · 0.85
test_strip_pex_envFunction · 0.85

Calls 4

run_pex_commandFunction · 0.90
assert_successMethod · 0.80
make_envFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected