~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_graph.py

  • Committer: Ian Clatworthy
  • Date: 2009-01-29 05:21:36 UTC
  • mfrom: (3921.3.14 bzr.missing_revision)
  • mto: This revision was merged to the branch mainline in revision 3970.
  • Revision ID: ian.clatworthy@canonical.com-20090129052136-1a0ue2k2rhxznu23
Add local & remote revision filtering to missing (Marius Kruger)

Show diffs side-by-side

added added

removed removed

Lines of Context:
698
698
        instrumented_graph.is_ancestor('rev2a', 'rev2b')
699
699
        self.assertTrue('null:' not in instrumented_provider.calls)
700
700
 
 
701
    def test_is_between(self):
 
702
        graph = self.make_graph(ancestry_1)
 
703
        self.assertEqual(True, graph.is_between('null:', 'null:', 'null:'))
 
704
        self.assertEqual(True, graph.is_between('rev1', 'null:', 'rev1'))
 
705
        self.assertEqual(True, graph.is_between('rev1', 'rev1', 'rev4'))
 
706
        self.assertEqual(True, graph.is_between('rev4', 'rev1', 'rev4'))
 
707
        self.assertEqual(True, graph.is_between('rev3', 'rev1', 'rev4'))
 
708
        self.assertEqual(False, graph.is_between('rev4', 'rev1', 'rev3'))
 
709
        self.assertEqual(False, graph.is_between('rev1', 'rev2a', 'rev4'))
 
710
        self.assertEqual(False, graph.is_between('null:', 'rev1', 'rev4'))
 
711
 
701
712
    def test_is_ancestor_boundary(self):
702
713
        """Ensure that we avoid searching the whole graph.
703
714