/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: Robert Collins
  • Date: 2009-03-24 07:09:11 UTC
  • mto: This revision was merged to the branch mainline in revision 4199.
  • Revision ID: robertc@robertcollins.net-20090324070911-w59etn9q3f9xj4fu
Cache ghosts when we can get them from a RemoteRepository in get_parent_map.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1432
1432
        # only present 1 time.
1433
1433
        self.assertEqual(['a', 'b'], sorted(self.inst_pp.calls))
1434
1434
 
 
1435
    def test_note_missing_key(self):
 
1436
        """After noting that a key is missing it is cached."""
 
1437
        self.caching_pp.note_missing_key('b')
 
1438
        self.assertEqual({}, self.caching_pp.get_parent_map(['b']))
 
1439
        self.assertEqual([], self.inst_pp.calls)
 
1440
        self.assertEqual(set(['b']), self.caching_pp.missing_keys)
 
1441
 
1435
1442
 
1436
1443
class TestCachingParentsProviderExtras(tests.TestCaseWithTransport):
1437
1444
    """Test the behaviour when parents are provided that were not requested."""