~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test__annotator.py

  • Committer: John Arbash Meinel
  • Date: 2009-06-18 21:02:01 UTC
  • mto: This revision was merged to the branch mainline in revision 4522.
  • Revision ID: john@arbash-meinel.com-20090618210201-o1dwswy4e6x7fpmb
Assert that entries in the annotation cache also get cleaned up.
This actually drops peak mem by almost 100MB, I wouldn't think the annotations
would be that expensive...
Anyway, texts themselves are still held by the VF stream, so we only save
for other things that we might be caching.

Show diffs side-by-side

added added

removed removed

Lines of Context:
268
268
                          self.ff_key: 1,
269
269
                         }, self.ann._num_needed_children)
270
270
        self.assertTrue(self.fa_key in self.ann._text_cache)
 
271
        self.assertTrue(self.fa_key in self.ann._annotations_cache)
271
272
        self.ann._record_annotation(self.fd_key, [self.fb_key, self.fc_key], [])
272
273
        self.assertEqual({self.fa_key: 2,
273
274
                          self.fb_key: 0,
277
278
                          self.ff_key: 1,
278
279
                         }, self.ann._num_needed_children)
279
280
        self.assertTrue(self.fa_key in self.ann._text_cache)
 
281
        self.assertTrue(self.fa_key in self.ann._annotations_cache)
280
282
        self.assertFalse(self.fb_key in self.ann._text_cache)
 
283
        self.assertFalse(self.fa_key in self.ann._annotations_cache)
281
284
        self.assertFalse(self.fc_key in self.ann._text_cache)
 
285
        self.assertFalse(self.fa_key in self.ann._annotations_cache)