(
tmpdir, # type: Tempdir
pex, # type: str
)
| 95 | |
| 96 | @pytest.fixture |
| 97 | def 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 | |
| 115 | def test_force(create_pex_venv): |
no test coverage detected