/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_graph.py

  • Committer: Marius Kruger
  • Date: 2009-01-01 21:46:06 UTC
  • mto: (3969.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 3970.
  • Revision ID: amanic@gmail.com-20090101214606-lak9wejufcjehpm6
extract graph.is_between from builtins.cmd_tags.run, and test it

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