def test_completion_for_bash(script):
 bash_completion = '_pip_completion()\n{\n    COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \\\n                   COMP_CWORD=$COMP_CWORD \\\n                   PIP_AUTO_COMPLETE=1 $1 ) )\n}\ncomplete -o default -F _pip_completion pip'
 result = script.pip('completion', '--bash')
 assert (bash_completion in result.stdout), 'bash completion is wrong'

def test_completion_for_bash ( script ) : bash_completion = '_pip_completion()\n{\n    COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \\\n                   COMP_CWORD=$COMP_CWORD \\\n                   PIP_AUTO_COMPLETE=1 $1 ) )\n}\ncomplete -o default -F _pip_completion pip' result = script . pip ( 'completion' , '--bash' ) assert ( bash_completion in result . stdout ) , 'bash completion is wrong'
test getting completion for bash shell .