def test_completion_for_zsh(script):
 zsh_completion = 'function _pip_completion {\n  local words cword\n  read -Ac words\n  read -cn cword\n  reply=( $( COMP_WORDS="$words[*]" \\\n             COMP_CWORD=$(( cword-1 )) \\\n             PIP_AUTO_COMPLETE=1 $words[1] ) )\n}\ncompctl -K _pip_completion pip'
 result = script.pip('completion', '--zsh')
 assert (zsh_completion in result.stdout), 'zsh completion is wrong'

def test_completion_for_zsh ( script ) : zsh_completion = 'function _pip_completion {\n  local words cword\n  read -Ac words\n  read -cn cword\n  reply=( $( COMP_WORDS="$words[*]" \\\n             COMP_CWORD=$(( cword-1 )) \\\n             PIP_AUTO_COMPLETE=1 $words[1] ) )\n}\ncompctl -K _pip_completion pip' result = script . pip ( 'completion' , '--zsh' ) assert ( zsh_completion in result . stdout ) , 'zsh completion is wrong'
test getting completion for zsh shell .