~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_groupcompress.py

Change settings to a dict. That way the attributes are still named.

Show diffs side-by-side

added added

removed removed

Lines of Context:
567
567
        vf.writer.end()
568
568
        vf._max_bytes_to_index = 1234
569
569
        record = vf.get_record_stream([('a',)], 'unordered', True).next()
570
 
        self.assertEqual((1234,), record._manager._get_compressor_settings())
 
570
        self.assertEqual(dict(max_bytes_to_index=1234),
 
571
                         record._manager._get_compressor_settings())
571
572
 
572
573
    def test_insert_record_stream_reuses_blocks(self):
573
574
        vf = self.make_test_vf(True, dir='source')
1138
1139
                ' does not handle compressor_settings')
1139
1140
        locations, old_block = self.make_block(self._texts)
1140
1141
        manager = groupcompress._LazyGroupContentManager(old_block,
1141
 
            get_compressor_settings=lambda: (32,))
 
1142
            get_compressor_settings=lambda: dict(max_bytes_to_index=32))
1142
1143
        gc = manager._make_group_compressor()
1143
1144
        self.assertEqual(32, gc._delta_index._max_bytes_to_index)
1144
1145
        self.add_key_to_manager(('key3',), locations, old_block, manager)