def test_upgrade_with_newest_already_installed(script, data):
 script.pip('install', '-f', data.find_links, '--no-index', 'simple')
 result = script.pip('install', '--upgrade', '-f', data.find_links, '--no-index', 'simple')
 assert (not result.files_created), 'simple upgraded when it should not have'
 assert ('already up-to-date' in result.stdout), result.stdout

def test_upgrade_with_newest_already_installed ( script , data ) : script . pip ( 'install' , '-f' , data . find_links , '--no-index' , 'simple' ) result = script . pip ( 'install' , '--upgrade' , '-f' , data . find_links , '--no-index' , 'simple' ) assert ( not result . files_created ) , 'simple upgraded when it should not have' assert ( 'already up-to-date' in result . stdout ) , result . stdout
if the newest version of a package is already installed .