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

Function create_pip

tests/test_pip.py:65–83  ·  view source on GitHub ↗
(pex_root)

Source from the content-addressed store, hash-verified

63
64@pytest.fixture
65def create_pip(pex_root):
66 # type: (str) -> Iterator[CreatePip]
67
68 def create_pip(
69 interpreter, # type: Optional[PythonInterpreter]
70 version=PipVersion.DEFAULT, # type: PipVersionValue
71 extra_requirements=(), # type: Iterable[Requirement]
72 **extra_env # type: str
73 ):
74 # type: (...) -> Pip
75 with ENV.patch(PEX_ROOT=pex_root, **extra_env):
76 return get_pip(
77 interpreter=interpreter,
78 version=version,
79 resolver=ConfiguredResolver.default(),
80 extra_requirements=tuple(extra_requirements),
81 )
82
83 yield create_pip
84
85
86all_pip_versions = pytest.mark.parametrize(

Calls 3

get_pipFunction · 0.90
patchMethod · 0.45
defaultMethod · 0.45

Tested by

no test coverage detected