/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_groupcompress.py

  • Committer: Jelmer Vernooij
  • Date: 2009-10-27 21:54:26 UTC
  • mfrom: (4771 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4833.
  • Revision ID: jelmer@samba.org-20091027215426-72164bkd4mq9dsd4
merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
459
459
                         ], block._dump())
460
460
 
461
461
 
462
 
class TestCaseWithGroupCompressVersionedFiles(tests.TestCaseWithTransport):
 
462
class TestCaseWithGroupCompressVersionedFiles(
 
463
        tests.TestCaseWithMemoryTransport):
463
464
 
464
465
    def make_test_vf(self, create_graph, keylength=1, do_cleanup=True,
465
466
                     dir='.', inconsistency_fatal=True):
732
733
                              " \('b',\) \('42 32 0 8', \(\(\),\)\) \('74 32"
733
734
                              " 0 8', \(\(\('a',\),\),\)\)")
734
735
 
 
736
    def test_clear_cache(self):
 
737
        vf = self.make_source_with_b(True, 'source')
 
738
        vf.writer.end()
 
739
        for record in vf.get_record_stream([('a',), ('b',)], 'unordered',
 
740
                                           True):
 
741
            pass
 
742
        self.assertTrue(len(vf._group_cache) > 0)
 
743
        vf.clear_cache()
 
744
        self.assertEqual(0, len(vf._group_cache))
 
745
 
 
746
 
735
747
 
736
748
class StubGCVF(object):
737
749
    def __init__(self, canned_get_blocks=None):