#NEWLINE# def test_overlaps_is_solved_prefering_some_kind_over_other( self ) : #NEWLINE# #INDENT# combiner = ( lambda rank : KindPreferenceCombinedNERRunner ( [ self . runner1 , self . runner2 ] , rank = rank ) ) #NEWLINE# combiner ( [ 'X' , 'W' , 'Y' , 'Z' ] ) ( self . doc ) #NEWLINE# self . assertEqual ( self . doc . set_ner_result . call_args_list [ ( - 1 ) ] , mock . call ( self . result1 ) ) #NEWLINE# combiner ( [ 'X' , 'W' ] ) ( self . doc ) #NEWLINE# self . assertEqual ( combiner . doc . set_ner_result . call_args_list [ ( - 1 ) ] , mock . call ( self . result1 ) ) #NEWLINE# combiner ( [ 'Z' , 'Y' ] ) ( self . doc ) #NEWLINE# self . assertEqual ( self . doc . set_ner_result . call_args_list [ ( - 1 ) ] , mock . call ( self . result2 ) )