/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: John Arbash Meinel
  • Date: 2007-12-04 18:11:51 UTC
  • mfrom: (3074 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3075.
  • Revision ID: john@arbash-meinel.com-20071204181151-br85qwsgshso16q5
[merge] bzr.dev 3074

Show diffs side-by-side

added added

removed removed

Lines of Context:
236
236
                         graph.find_unique_lca(NULL_REVISION, 'rev1'))
237
237
        self.assertEqual('rev1', graph.find_unique_lca('rev1', 'rev1'))
238
238
        self.assertEqual('rev1', graph.find_unique_lca('rev2a', 'rev2b'))
 
239
        self.assertEqual(('rev1', 1,),
 
240
                         graph.find_unique_lca('rev2a', 'rev2b',
 
241
                         count_steps=True))
239
242
 
240
243
    def test_unique_lca_criss_cross(self):
241
244
        """Ensure we don't pick non-unique lcas in a criss-cross"""
242
245
        graph = self.make_graph(criss_cross)
243
246
        self.assertEqual('rev1', graph.find_unique_lca('rev3a', 'rev3b'))
 
247
        lca, steps = graph.find_unique_lca('rev3a', 'rev3b', count_steps=True)
 
248
        self.assertEqual('rev1', lca)
 
249
        self.assertEqual(2, steps)
244
250
 
245
251
    def test_unique_lca_null_revision(self):
246
252
        """Ensure we pick NULL_REVISION when necessary"""
373
379
        self.assertEqual(set(['rev1']), graph.heads(('rev1', 'null:')))
374
380
 
375
381
    def test_heads_one(self):
376
 
        # A single node will alwaya be a head
 
382
        # A single node will always be a head
377
383
        graph = self.make_graph(ancestry_1)
378
384
        self.assertEqual(set(['null:']), graph.heads(['null:']))
379
385
        self.assertEqual(set(['rev1']), graph.heads(['rev1']))