/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: Aaron Bentley
  • Date: 2009-03-11 07:24:19 UTC
  • mfrom: (4110 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4130.
  • Revision ID: aaron@aaronbentley.com-20090311072419-029z2ec0lxfc6ns1
Merge bzr.dev into send-hookage

Show diffs side-by-side

added added

removed removed

Lines of Context:
1543
1543
        par = _mod_graph.PendingAncestryResult(['rev-2'], repo)
1544
1544
        self.assertEqual(set(['rev-1', 'rev-2']), set(par.get_keys()))
1545
1545
 
 
1546
    def test_get_keys_excludes_null(self):
 
1547
        # Make a 'graph' with an iter_ancestry that returns NULL_REVISION
 
1548
        # somewhere other than the last element, which can happen in real
 
1549
        # ancestries.
 
1550
        class StubGraph(object):
 
1551
            def iter_ancestry(self, keys):
 
1552
                return [(NULL_REVISION, ()), ('foo', (NULL_REVISION,))]
 
1553
        par = _mod_graph.PendingAncestryResult(['rev-3'], None)
 
1554
        par_keys = par._get_keys(StubGraph())
 
1555
        # Only the non-null keys from the ancestry appear.
 
1556
        self.assertEqual(set(['foo']), set(par_keys))
 
1557