def test_links_propagated(self):
        from ..component_link import ComponentLink
        d = Data()
        dc = DataCollection([d])

        cid1 = d.add_component(np.array([1, 2, 3]), 'a')
        cid2 = ComponentID('b')
        cid3 = ComponentID('c')

        dummy = lambda x: None
        links = ComponentLink([cid1], cid2, dummy)
        dc.add_link(links)
        assert cid2 in d.components

        links = ComponentLink([cid2], cid3, dummy)
        dc.add_link(links)
        assert cid3 in d.components
Web of links is grown and applied to data automatically
dataset/ETHPy150Open glue-viz/glue/glue/core/tests/test_data_collection.py/TestDataCollection.test_links_propagated