def test_install_package_with_prefix(script, data):
 prefix_path = (script.scratch_path / 'prefix')
 result = script.pip('install', '--prefix', prefix_path, '-f', data.find_links, '--no-binary', 'simple', '--no-index', 'simple==1.0')
 if hasattr(sys, 'pypy_version_info'):
  path = (script.scratch / 'prefix')
 else:
  path = (((script.scratch / 'prefix') / 'lib') / 'python{0}'.format(pyversion))
 install_path = ((path / 'site-packages') / 'simple-1.0-py{0}.egg-info'.format(pyversion))
 assert (install_path in result.files_created), str(result)

def test_install_package_with_prefix ( script , data ) : prefix_path = ( script . scratch_path / 'prefix' ) result = script . pip ( 'install' , '--prefix' , prefix_path , '-f' , data . find_links , '--no-binary' , 'simple' , '--no-index' , 'simple==1.0' ) if hasattr ( sys , 'pypy_version_info' ) : path = ( script . scratch / 'prefix' ) else : path = ( ( ( script . scratch / 'prefix' ) / 'lib' ) / 'python{0}' . format ( pyversion ) ) install_path = ( ( path / 'site-packages' ) / 'simple-1.0-py{0}.egg-info' . format ( pyversion ) ) assert ( install_path in result . files_created ) , str ( result )
test installing a package using pip install --prefix .