~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test__known_graph.py

  • Committer: John Arbash Meinel
  • Date: 2009-08-26 16:03:59 UTC
  • mto: (4634.6.7 2.0)
  • mto: This revision was merged to the branch mainline in revision 4660.
  • Revision ID: john@arbash-meinel.com-20090826160359-ge4mai928bi3a5g2
Fix bug #419241. If a graph had a mainline ghost
we could get a segfault during KnownGraph.merge_sort().

Show diffs side-by-side

added added

removed removed

Lines of Context:
731
731
             ('A', 0, (1,), True),
732
732
            ])
733
733
 
 
734
    def test_lefthand_ghost(self):
 
735
        # ghost
 
736
        #  |
 
737
        #  A
 
738
        #  |
 
739
        #  B
 
740
        self.assertSortAndIterate(
 
741
            {'A': ['ghost'],
 
742
             'B': ['A'],
 
743
            }, 'B',
 
744
            [('B', 0, (2,), False),
 
745
             ('A', 0, (1,), True),
 
746
            ])
 
747
 
734
748
    def test_graph_cycle(self):
735
749
        # merge_sort should fail with a simple error when a graph cycle is
736
750
        # encountered.