#NEWLINE# @ pytest . mark . network #NEWLINE# def test_uninstall_before_upgrade_from_url( script ) : #NEWLINE# #INDENT# '\n    Automatic uninstall-before-upgrade from URL.\n\n    ' #NEWLINE# result = script . pip ( 'install' , 'INITools==0.2' , expect_error = True ) #NEWLINE# assert ( ( script . site_packages / 'initools' ) in script . files_created ) , sorted ( result . files_created . keys ( ) ) #NEWLINE# result2 = script . pip ( 'install' , 'http://pypi.python.org/packages/source/I/INITools/INITools-0.3.tar.gz' , expect_error = True ) #NEWLINE# assert result2 . files_created , 'upgrade to INITools 0.3 failed' #NEWLINE# result3 = script . pip ( 'uninstall' , 'initools' , '-y' , expect_error = True ) #NEWLINE# assert_all_changes ( result , result3 , [ ( script . venv / 'build' ) , 'cache' ] )