@pytest.mark.network
def test_install_with_ignoreinstalled_requested(script):
 script.pip('install', 'INITools==0.1', expect_error=True)
 result = script.pip('install', '-I', 'INITools==0.3', expect_error=True)
 assert result.files_created, 'pip install -I did not install'
 assert os.path.exists(((script.site_packages_path / 'INITools-0.1-py%s.egg-info') % pyversion))
 assert os.path.exists(((script.site_packages_path / 'INITools-0.3-py%s.egg-info') % pyversion))

@ pytest . mark . network def test_install_with_ignoreinstalled_requested ( script ) : script . pip ( 'install' , 'INITools==0.1' , expect_error = True ) result = script . pip ( 'install' , '-I' , 'INITools==0.3' , expect_error = True ) assert result . files_created , 'pip install -I did not install' assert os . path . exists ( ( ( script . site_packages_path / 'INITools-0.1-py%s.egg-info' ) % pyversion ) ) assert os . path . exists ( ( ( script . site_packages_path / 'INITools-0.3-py%s.egg-info' ) % pyversion ) )
test old conflicting package is completely ignored .