#NEWLINE# def test_main( monkeypatch , capsys ) : #NEWLINE# #INDENT# 'Test if main commmand shows help when called without the subcommand.' #NEWLINE# monkeypatch . setattr ( sys , 'argv' , [ 'pytest-bdd' ] ) #NEWLINE# monkeypatch . setattr ( sys , 'exit' , ( lambda x : x ) ) #NEWLINE# main ( ) #NEWLINE# ( out , err ) = capsys . readouterr ( ) #NEWLINE# assert ( 'usage: pytest-bdd [-h]' in out ) #NEWLINE# assert ( 'pytest-bdd: error:' in err )