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

  • Committer: Jelmer Vernooij
  • Date: 2017-12-04 23:01:39 UTC
  • mto: This revision was merged to the branch mainline in revision 6839.
  • Revision ID: jelmer@jelmer.uk-20171204230139-1sc3c18ikwewdejm
Remove bytes_to_gzip; work with chunks instead.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
    def assertToGzip(self, chunks):
33
33
        raw_bytes = b''.join(chunks)
34
34
        gzfromchunks = tuned_gzip.chunks_to_gzip(chunks)
35
 
        gzfrombytes = tuned_gzip.bytes_to_gzip(raw_bytes)
36
 
        self.assertEqual(gzfrombytes, gzfromchunks)
37
 
        decoded = gzip.GzipFile(fileobj=BytesIO(gzfromchunks)).read()
 
35
        decoded = gzip.GzipFile(fileobj=BytesIO(b''.join(gzfromchunks))).read()
38
36
        lraw, ldecoded = len(raw_bytes), len(decoded)
39
37
        self.assertEqual(lraw, ldecoded,
40
38
                         'Expecting data length %d, got %d' % (lraw, ldecoded))