~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_graph.py

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
699
699
        self.assertEqual({'rev2': ['rev1']},
700
700
                         stacked.get_parent_map(['rev2']))
701
701
 
702
 
    def test__stacked_parents_provider_deprecated(self):
703
 
        parents1 = _mod_graph.DictParentsProvider({'rev2': ['rev3']})
704
 
        parents2 = _mod_graph.DictParentsProvider({'rev1': ['rev4']})
705
 
        stacked = self.applyDeprecated(deprecated_in((1, 16, 0)),
706
 
                    _mod_graph._StackedParentsProvider, [parents1, parents2])
707
 
        self.assertEqual({'rev1':['rev4'], 'rev2':['rev3']},
708
 
                         stacked.get_parent_map(['rev1', 'rev2']))
709
 
        self.assertEqual({'rev2':['rev3'], 'rev1':['rev4']},
710
 
                         stacked.get_parent_map(['rev2', 'rev1']))
711
 
        self.assertEqual({'rev2':['rev3']},
712
 
                         stacked.get_parent_map(['rev2', 'rev2']))
713
 
        self.assertEqual({'rev1':['rev4']},
714
 
                         stacked.get_parent_map(['rev1', 'rev1']))
715
 
 
716
702
    def test_iter_topo_order(self):
717
703
        graph = self.make_graph(ancestry_1)
718
704
        args = ['rev2a', 'rev3', 'rev1']