Example #1
0
def test_can_add_handles_invalid_wheel_filename(python_35_interpreter):
    # type: (PythonInterpreter) -> None
    pex_environment = PEXEnvironment(
        pex="",
        pex_info=PexInfo.default(python_35_interpreter),
        interpreter=python_35_interpreter)
    assert pex_environment.can_add(Distribution("pep427-invalid.whl")) is False
Example #2
0
def test_can_add_handles_optional_build_tag_in_wheel(
    python_35_interpreter, wheel_distribution, wheel_is_linux
):
    # type: (PythonInterpreter, str, bool) -> None
    pex_environment = PEXEnvironment(
        pex="", pex_info=PexInfo.default(python_35_interpreter), interpreter=python_35_interpreter
    )
    native_wheel = IS_LINUX and wheel_is_linux
    assert pex_environment.can_add(wheel_distribution) is native_wheel
Example #3
0
def test_can_add_handles_optional_build_tag_in_wheel(python_35_interpreter,
                                                     wheel_filename,
                                                     wheel_is_linux):
    pex_environment = PEXEnvironment(
        pex="",
        pex_info=PexInfo.default(python_35_interpreter),
        interpreter=python_35_interpreter)
    native_wheel = IS_LINUX and wheel_is_linux
    assert pex_environment.can_add(
        Distribution(wheel_filename)) is native_wheel