~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_graph.py

  • Committer: Gary van der Merwe
  • Date: 2009-05-27 14:10:59 UTC
  • mto: This revision was merged to the branch mainline in revision 4420.
  • Revision ID: garyvdm@gmail.com-20090527141059-vgcetdtl1pebfdy4
Rename and add doc string for StackedParentsProvider.

Show diffs side-by-side

added added

removed removed

Lines of Context:
665
665
    def test_stacked_parents_provider(self):
666
666
        parents1 = _mod_graph.DictParentsProvider({'rev2': ['rev3']})
667
667
        parents2 = _mod_graph.DictParentsProvider({'rev1': ['rev4']})
668
 
        stacked = _mod_graph._StackedParentsProvider([parents1, parents2])
 
668
        stacked = _mod_graph.StackedParentsProvider([parents1, parents2])
669
669
        self.assertEqual({'rev1':['rev4'], 'rev2':['rev3']},
670
670
                         stacked.get_parent_map(['rev1', 'rev2']))
671
671
        self.assertEqual({'rev2':['rev3'], 'rev1':['rev4']},
682
682
        # 2
683
683
        parents1 = _mod_graph.DictParentsProvider({'rev2': ['rev1']})
684
684
        parents2 = _mod_graph.DictParentsProvider({'rev2': ['rev1']})
685
 
        stacked = _mod_graph._StackedParentsProvider([parents1, parents2])
 
685
        stacked = _mod_graph.StackedParentsProvider([parents1, parents2])
686
686
        self.assertEqual({'rev2': ['rev1']},
687
687
                         stacked.get_parent_map(['rev2']))
688
688