def test_install_from_wheel_file(script, data):
 package = data.packages.join('simple.dist-0.1-py2.py3-none-any.whl')
 result = script.pip('install', package, '--no-index', expect_error=False)
 dist_info_folder = (script.site_packages / 'simple.dist-0.1.dist-info')
 assert (dist_info_folder in result.files_created), (dist_info_folder, result.files_created, result.stdout)
 installer = (dist_info_folder / 'INSTALLER')
 assert (installer in result.files_created), (dist_info_folder, result.files_created, result.stdout)
 with open((script.base_path / installer), 'rb') as installer_file:
  installer_details = installer_file.read()
  assert (installer_details == 'pip\n')
 installer_temp = (dist_info_folder / 'INSTALLER.pip')
 assert (installer_temp not in result.files_created), (dist_info_folder, result.files_created, result.stdout)

def test_install_from_wheel_file ( script , data ) : package = data . packages . join ( 'simple.dist-0.1-py2.py3-none-any.whl' ) result = script . pip ( 'install' , package , '--no-index' , expect_error = False ) dist_info_folder = ( script . site_packages / 'simple.dist-0.1.dist-info' ) assert ( dist_info_folder in result . files_created ) , ( dist_info_folder , result . files_created , result . stdout ) installer = ( dist_info_folder / 'INSTALLER' ) assert ( installer in result . files_created ) , ( dist_info_folder , result . files_created , result . stdout ) with open ( ( script . base_path / installer ) , 'rb' ) as installer_file : installer_details = installer_file . read ( ) assert ( installer_details == 'pip\n' ) installer_temp = ( dist_info_folder / 'INSTALLER.pip' ) assert ( installer_temp not in result . files_created ) , ( dist_info_folder , result . files_created , result . stdout )
test installing directly from a wheel file .