#NEWLINE# def test_subcommand( self ) : #NEWLINE# #INDENT# def func1( x ) : #NEWLINE# #INDENT# return ( x + ' world' ) #NEWLINE# #UNINDENT# def func2( ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# ru = runner . Clize . get_cli ( [ func1 , func2 ] ) #NEWLINE# self . assertEqual ( ru ( 'test' , 'func1' , 'hello' ) , 'hello world' ) #NEWLINE# self . assertEqual ( ru ( 'test' , 'func2' ) , None ) #NEWLINE# self . assertRaises ( errors . ArgumentError , ru , 'test' , 'func2' , 'abc' ) #NEWLINE# self . assertRaises ( errors . ArgumentError , func2 , 'test' , 'func3' )