Exemple #1
0
 def test_depends_on__test_supporters(self):
     vtx = Vertex('vertex_0', VerticesMap(None))
     vtx.depends_on('vertex_1', 'vertex_2')
     expected = ['vertex_1', 'vertex_2']
     self.assertEqual(expected, vtx.supporters(recurse=False))
     vtx.depends_on('vertex_2', 'vertex_3')
     expected = ['vertex_1', 'vertex_2', 'vertex_3']
     self.assertEqual(expected, vtx.supporters(recurse=False))
Exemple #2
0
 def test_all_supporters(self):
     vmap = VerticesMap(None)
     a = Vertex('a', vmap)
     a.depends_on('b')
     b = vmap['b']
     b.depends_on('c')
     self.assertEqual(['b', 'c'], a.supporters(recurse=True))