#NEWLINE# def test_foreign_pixel_components_not_in_visible( ) : #NEWLINE# #INDENT# 'Pixel components from other data should not be visible' #NEWLINE# from .. link_helpers import LinkSame #NEWLINE# from .. data_collection import DataCollection #NEWLINE# d1 = Data ( x = [ 1 ] , y = [ 2 ] ) #NEWLINE# d2 = Data ( w = [ 3 ] , v = [ 4 ] ) #NEWLINE# dc = DataCollection ( [ d1 , d2 ] ) #NEWLINE# dc . add_link ( LinkSame ( d1 . id [ 'x' ] , d2 . id [ 'w' ] ) ) #NEWLINE# dc . add_link ( LinkSame ( d1 . get_world_component_id ( 0 ) , d2 . get_world_component_id ( 0 ) ) ) #NEWLINE# assert ( d2 . get_pixel_component_id ( 0 ) not in d2 . visible_components ) #NEWLINE# np . testing . assert_array_equal ( d1 [ d2 . get_pixel_component_id ( 0 ) ] , [ 0 ] )