def test_completion_for_un_snippet(script):
 (res, env) = setup_completion(script, 'pip un', '1')
 assert (res.stdout.strip().split() == ['uninstall']), res.stdout

def test_completion_for_un_snippet ( script ) : ( res , env ) = setup_completion ( script , 'pip un' , '1' ) assert ( res . stdout . strip ( ) . split ( ) == [ 'uninstall' ] ) , res . stdout
test getting completion for un should return uninstall .