@pytest.mark.network
def test_upgrade_to_specific_version(script):
 script.pip('install', 'INITools==0.1', expect_error=True)
 result = script.pip('install', 'INITools==0.2', expect_error=True)
 assert result.files_created, 'pip install with specific version did not upgrade'
 assert (((script.site_packages / 'INITools-0.1-py%s.egg-info') % pyversion) in result.files_deleted)
 assert (((script.site_packages / 'INITools-0.2-py%s.egg-info') % pyversion) in result.files_created)

@ pytest . mark . network def test_upgrade_to_specific_version ( script ) : script . pip ( 'install' , 'INITools==0.1' , expect_error = True ) result = script . pip ( 'install' , 'INITools==0.2' , expect_error = True ) assert result . files_created , 'pip install with specific version did not upgrade' assert ( ( ( script . site_packages / 'INITools-0.1-py%s.egg-info' ) % pyversion ) in result . files_deleted ) assert ( ( ( script . site_packages / 'INITools-0.2-py%s.egg-info' ) % pyversion ) in result . files_created )
it does upgrade to specific version requested .