@pytest.mark.cmd
def test_pootle_init(capfd):
 call(['pootle', 'init', '--help'])
 (out, err) = capfd.readouterr()
 assert ('--db' in out)

@ pytest . mark . cmd def test_pootle_init ( capfd ) : call ( [ 'pootle' , 'init' , '--help' ] ) ( out , err ) = capfd . readouterr ( ) assert ( '--db' in out )
pootle init --help .