#NEWLINE# def test_fully_adjacent( self ) : #NEWLINE# #INDENT# self . label [ : 2 , : ] = 1 #NEWLINE# expected_mat = numpy . array ( [ [ True , True ] , [ True , True ] ] ) #NEWLINE# ( adj_mat , adj_dic ) = selective_search . _calc_adjacency_matrix ( self . label , 2 ) #NEWLINE# assert ( ( adj_mat . shape == ( 2 , 2 ) ) and ( adj_mat . dtype == bool ) ) #NEWLINE# assert numpy . array_equal ( adj_mat , expected_mat ) #NEWLINE# assert ( adj_dic [ 0 ] == { 1 } ) #NEWLINE# assert ( adj_dic [ 1 ] == { 0 } )