#NEWLINE# def test_empty_sub_command( ) : #NEWLINE# #INDENT# with patch . object ( EmptyCommandLine , '_main' ) as _main : #NEWLINE# #INDENT# with patch . object ( EmptyCommandLine , '_sub' ) as _sub : #NEWLINE# #INDENT# e = EmptyCommandLine ( raise_exceptions = True ) #NEWLINE# e . run ( e . parse ( [ 'sub' ] ) ) #NEWLINE# assert ( not _main . called ) #NEWLINE# assert ( _main . call_count == 1 )