#NEWLINE# def test_getargs_fail( self , reporter , dep_manager ) : #NEWLINE# #INDENT# def check_x( my_x ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# t1 = Task ( 't1' , [ ( lambda : True ) ] ) #NEWLINE# n1 = ExecNode ( t1 , None ) #NEWLINE# t2 = Task ( 't2' , [ ( check_x , ) ] , getargs = { #NEWLINE# #INDENT# 'my_x' : ( 't1' , 'x' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# n2 = ExecNode ( t2 , None ) #NEWLINE# tasks_dict = { #NEWLINE# #INDENT# 't1' : t1 , #NEWLINE# 't2' : t2 , #NEWLINE# #UNINDENT# } #NEWLINE# my_runner = runner . Runner ( dep_manager , reporter ) #NEWLINE# assert ( False == my_runner . select_task ( n2 , tasks_dict ) ) #NEWLINE# assert ( ( 'start' , t2 ) == reporter . log . pop ( 0 ) ) #NEWLINE# assert ( True == my_runner . select_task ( n1 , tasks_dict ) ) #NEWLINE# assert ( ( 'start' , t1 ) == reporter . log . pop ( 0 ) ) #NEWLINE# t1_result = my_runner . execute_task ( t1 ) #NEWLINE# assert ( ( 'execute' , t1 ) == reporter . log . pop ( 0 ) ) #NEWLINE# my_runner . process_task_result ( n1 , t1_result ) #NEWLINE# assert ( ( 'success' , t1 ) == reporter . log . pop ( 0 ) ) #NEWLINE# assert ( False == my_runner . select_task ( n2 , tasks_dict ) ) #NEWLINE# assert ( ( 'fail' , t2 ) == reporter . log . pop ( 0 ) ) #NEWLINE# assert ( not reporter . log )