@pytest.mark.network
def test_uninstall_console_scripts(script):
 args = ['install']
 args.append('discover')
 result = script.pip(*args, **{'expect_error': True})
 assert (((script.bin / 'discover') + script.exe) in result.files_created), sorted(result.files_created.keys())
 result2 = script.pip('uninstall', 'discover', '-y', expect_error=True)
 assert_all_changes(result, result2, [(script.venv / 'build'), 'cache'])

@ pytest . mark . network def test_uninstall_console_scripts ( script ) : args = [ 'install' ] args . append ( 'discover' ) result = script . pip ( * args , ** { 'expect_error' : True } ) assert ( ( ( script . bin / 'discover' ) + script . exe ) in result . files_created ) , sorted ( result . files_created . keys ( ) ) result2 = script . pip ( 'uninstall' , 'discover' , '-y' , expect_error = True ) assert_all_changes ( result , result2 , [ ( script . venv / 'build' ) , 'cache' ] )
test uninstalling a package with more files .