/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: Martin Pool
  • Date: 2009-03-12 02:43:02 UTC
  • mfrom: (4121 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4140.
  • Revision ID: mbp@sourcefrog.net-20090312024302-aynicfx1ywm0k9dl
merge trunk

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