~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testgraph.py

  • Committer: Aaron Bentley
  • Date: 2005-09-21 15:33:23 UTC
  • mto: (1185.1.37)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: abentley@panoramicfeedback.com-20050921153323-5db674d572d7649d
Fixed bug in distance-from-root graph operation

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
        assert nodes[3] in ('B', 'M')
39
39
        assert nodes[4] in ('B', 'M')
40
40
 
 
41
        #Ensure we don't shortcut through B when there's only a difference of
 
42
        # 1 in distance
 
43
        self.graph = {}
 
44
        self.edge_add('A', 'B', 'C')
 
45
        self.edge_add('A', 'D', 'E', 'C')
 
46
        descendants = self.node_descendants()
 
47
        distances = node_distances(self.graph, descendants, 'A')
 
48
        self.assertEqual(distances['C'], 3)
41
49