#NEWLINE# def test_new_cmd( self ) : #NEWLINE# #INDENT# class MyRawCmd ( self . MyCmd ) : #NEWLINE# #INDENT# def execute( self , params , args ) : #NEWLINE# #INDENT# return params [ 'my_opt' ] #NEWLINE# #UNINDENT# #UNINDENT# members = { #NEWLINE# #INDENT# 'task_xxx1' : ( lambda : { #NEWLINE# #INDENT# 'actions' : [ ] , #NEWLINE# #UNINDENT# } ) , #NEWLINE# #UNINDENT# } #NEWLINE# loader = ModuleTaskLoader ( members ) #NEWLINE# mycmd = MyRawCmd ( task_loader = loader , cmds = { #NEWLINE# #INDENT# 'foo' : None , #NEWLINE# 'bar' : None , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert ( mycmd . loader . cmd_names == [ 'bar' , 'foo' ] ) #NEWLINE# assert ( 'min' == mycmd . parse_execute ( [ '--mine' , 'min' ] ) )