def test_completion_for_fish(script):
 fish_completion = 'function __fish_complete_pip\n    set -lx COMP_WORDS (commandline -o) ""\n    set -lx COMP_CWORD (math (contains -i -- (commandline -t) $COMP_WORDS)-1)\n    set -lx PIP_AUTO_COMPLETE 1\n    string split \\  -- (eval $COMP_WORDS[1])\nend\ncomplete -fa "(__fish_complete_pip)" -c pip'
 result = script.pip('completion', '--fish')
 assert (fish_completion in result.stdout), 'fish completion is wrong'

def test_completion_for_fish ( script ) : fish_completion = 'function __fish_complete_pip\n    set -lx COMP_WORDS (commandline -o) ""\n    set -lx COMP_CWORD (math (contains -i -- (commandline -t) $COMP_WORDS)-1)\n    set -lx PIP_AUTO_COMPLETE 1\n    string split \\  -- (eval $COMP_WORDS[1])\nend\ncomplete -fa "(__fish_complete_pip)" -c pip' result = script . pip ( 'completion' , '--fish' ) assert ( fish_completion in result . stdout ) , 'fish completion is wrong'
test getting completion for fish shell .