def test_download_wheel_bad_output(mocker, for_py_version, session_app_data):
    'if the download contains no match for what wheel was downloaded, pick one that matches from target'
    distribution = 'setuptools'
    p_open = mocker.MagicMock()
    mocker.patch('virtualenv.seed.wheels.acquire.Popen', return_value=p_open)
    p_open.communicate.return_value = ('', '')
    p_open.returncode = 0
    embed = get_embed_wheel(distribution, for_py_version)
    as_path = mocker.MagicMock()
    available = discover_wheels(BUNDLE_FOLDER, 'setuptools', None, for_py_version)
    as_path.iterdir.return_value = [i.path for i in available]
    result = download_wheel(distribution, '=={}'.format(embed.version), for_py_version, [], session_app_data, as_path)
    assert (result.path == embed.path)
if the download contains no match for what wheel was downloaded, pick one that matches from target
def test_download_wheel_bad_output(mocker, for_py_version, session_app_data):
    
    distribution = 'setuptools'
    p_open = mocker.MagicMock()
    mocker.patch('virtualenv.seed.wheels.acquire.Popen', return_value=p_open)
    p_open.communicate.return_value = (, )
    p_open.returncode = 0
    embed = get_embed_wheel(distribution, for_py_version)
    as_path = mocker.MagicMock()
    available = discover_wheels(BUNDLE_FOLDER, 'setuptools', None, for_py_version)
    as_path.iterdir.return_value = [i.path for i in available]
    result = download_wheel(distribution, '=={}'.format(embed.version), for_py_version, [], session_app_data, as_path)
    assert (result.path == embed.path)