def METHOD_NAME(mock_tools, android_sdk, tmp_path):
    """If the skin download fails, an error is raised."""
    skin_tgz_path = MagicMock(spec_set=Path)
    skin_tgz_path.__fspath__.return_value = "/path/to/skin.tgz"
    mock_tools.download.file.return_value = skin_tgz_path
    # Mock a failure downloading the skin
    mock_tools.download.file.side_effect = NetworkFailure("mock")
    # Verify the skin, triggering a download
    with pytest.raises(NetworkFailure, match="Unable to mock"):
        android_sdk.verify_emulator_skin("pixel_X")
    # An attempt was made to download the skin
    mock_tools.download.file.assert_called_once_with(
        url="https://android.googlesource.com/platform/tools/adt/idea/"
        "+archive/refs/heads/mirror-goog-studio-main/"
        "artwork/resources/device-art-resources/pixel_X.tar.gz",
        download_path=android_sdk.root_path,
        role="pixel_X device skin",
    )
    # Skin wasn't downloaded, so it wasn't unpacked
    assert mock_tools.shutil.unpack_archive.call_count == 0