示例#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()