/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 breezy/tests/test_groupcompress.py

  • Committer: Martin
  • Date: 2017-06-05 20:48:31 UTC
  • mto: This revision was merged to the branch mainline in revision 6658.
  • Revision ID: gzlist@googlemail.com-20170605204831-20accykspjcrx0a8
Apply 2to3 dict fixer and clean up resulting mess using view helpers

Show diffs side-by-side

added added

removed removed

Lines of Context:
304
304
        for key in sorted(key_to_text):
305
305
            compressor.compress(key, key_to_text[key], None)
306
306
        locs = dict((key, (start, end)) for key, (start, _, end, _)
307
 
                    in compressor.labels_deltas.iteritems())
 
307
                    in compressor.labels_deltas.items())
308
308
        block = compressor.flush()
309
309
        raw_bytes = block.to_bytes()
310
310
        # Go through from_bytes(to_bytes()) so that we start with a compressed
961
961
        for key in sorted(key_to_text):
962
962
            compressor.compress(key, key_to_text[key], None)
963
963
        locs = dict((key, (start, end)) for key, (start, _, end, _)
964
 
                    in compressor.labels_deltas.iteritems())
 
964
                    in compressor.labels_deltas.items())
965
965
        block = compressor.flush()
966
966
        raw_bytes = block.to_bytes()
967
967
        return locs, groupcompress.GroupCompressBlock.from_bytes(raw_bytes)