def test_eager_does_upgrade_dependecies_when_currently_satisfied(script):
 script.pip_install_local('simple==2.0', expect_error=True)
 result = script.pip_install_local('--upgrade', '--upgrade-strategy=eager', 'require_simple', expect_error=True)
 assert (((script.site_packages / 'require_simple-1.0-py%s.egg-info') % pyversion) not in result.files_deleted), 'should have installed require_simple==1.0'
 assert (((script.site_packages / 'simple-2.0-py%s.egg-info') % pyversion) in result.files_deleted), 'should have uninstalled simple==2.0'

def test_eager_does_upgrade_dependecies_when_currently_satisfied ( script ) : script . pip_install_local ( 'simple==2.0' , expect_error = True ) result = script . pip_install_local ( '--upgrade' , '--upgrade-strategy=eager' , 'require_simple' , expect_error = True ) assert ( ( ( script . site_packages / 'require_simple-1.0-py%s.egg-info' ) % pyversion ) not in result . files_deleted ) , 'should have installed require_simple==1.0' assert ( ( ( script . site_packages / 'simple-2.0-py%s.egg-info' ) % pyversion ) in result . files_deleted ) , 'should have uninstalled simple==2.0'
it does upgrade a dependency even if it already satisfies the requirements .