#NEWLINE# def test_links_propagated( self ) : #NEWLINE# #INDENT# 'Web of links is grown and applied to data automatically' #NEWLINE# from .. component_link import ComponentLink #NEWLINE# d = Data ( ) #NEWLINE# dc = DataCollection ( [ d ] ) #NEWLINE# cid1 = d . add_component ( np . array ( [ 1 , 2 , 3 ] ) , 'a' ) #NEWLINE# cid2 = ComponentID ( 'b' ) #NEWLINE# cid3 = ComponentID ( 'c' ) #NEWLINE# dummy = ( lambda x : None ) #NEWLINE# links = ComponentLink ( [ cid1 ] , cid2 , dummy ) #NEWLINE# dc . add_link ( links ) #NEWLINE# assert ( cid2 in d . components ) #NEWLINE# links = ComponentLink ( [ cid2 ] , cid3 , dummy ) #NEWLINE# dc . add_link ( links ) #NEWLINE# assert ( links in d . components )