#NEWLINE# @ pytest . mark . parametrize ( 'command, return_value' , [ ( Command ( script = 'vim' , stderr = 'vim: command not found' ) , PKGFILE_OUTPUT_VIM ) , ( Command ( script = 'sudo vim' , stderr = 'sudo: vim: command not found' ) , PKGFILE_OUTPUT_VIM ) ] ) #NEWLINE# @ patch ( 'thefuck.specific.archlinux.subprocess' ) #NEWLINE# @ patch . multiple ( pacman , create = True , pacman = pacman_cmd ) #NEWLINE# def test_match_mocked( subp_mock , command , return_value ) : #NEWLINE# #INDENT# subp_mock . check_output . return_value = subp_mock #NEWLINE# assert match ( command )