Пример #1
0
def test_patchelf_version_check_fail(check_output, version):
    check_output.return_value.decode.return_value = "patchelf {}".format(
        version)
    with pytest.raises(ValueError, match="patchelf {} found".format(version)):
        Patchelf()
Пример #2
0
def test_patchelf_check_output_fail(check_output):
    check_output.side_effect = CalledProcessError(1, "patchelf --version")
    with pytest.raises(ValueError, match="Could not call"):
        Patchelf()
Пример #3
0
def test_patchelf_version_check(check_output, version):
    check_output.return_value.decode.return_value = "patchelf {}".format(
        version)
    Patchelf()
Пример #4
0
def test_patchelf_unavailable(find_executable):
    find_executable.return_value = False
    with pytest.raises(ValueError):
        Patchelf()