def test_is_resolved__simplest_case(self): vmap = VerticesMap(None) a = Vertex('a', vmap) a.depends_on('b') self.assertFalse(a.is_resolved()) b = vmap['b'] self.assertFalse(b.is_resolved()) b.payload = 'payload for vert-b' self.assertFalse(a.is_resolved()) self.assertTrue(b.is_resolved()) a.payload = 'payload for vert-a' self.assertTrue(a.is_resolved()) self.assertTrue(b.is_resolved())
def test_is_resolved__simplest_case(self): dag = DepDag() a = Vertex('a', dag) a.depends_on('b') self.assertFalse(a.is_resolved()) b = dag['b'] self.assertFalse(b.is_resolved()) b.payload = 'payload for vert-b' self.assertFalse(a.is_resolved()) self.assertTrue(b.is_resolved()) a.payload = 'payload for vert-a' self.assertTrue(a.is_resolved()) self.assertTrue(b.is_resolved())