Rev 6582: Test fix mistakenly forgotten in previous commits. in file:///home/vila/src/bzr/bugs/1116079-gzip-compat/

Vincent Ladeuil v.ladeuil+lp at free.fr
Tue Jul 9 07:58:10 UTC 2013


At file:///home/vila/src/bzr/bugs/1116079-gzip-compat/

------------------------------------------------------------
revno: 6582
revision-id: v.ladeuil+lp at free.fr-20130709075810-ed3fr6kff4m9cvnb
parent: v.ladeuil+lp at free.fr-20130709074749-zba13yq8z0hwsejv
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 1116079-gzip-compat
timestamp: Tue 2013-07-09 09:58:10 +0200
message:
  Test fix mistakenly forgotten in previous commits.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_tuned_gzip.py'
--- a/bzrlib/tests/test_tuned_gzip.py	2011-05-13 12:51:05 +0000
+++ b/bzrlib/tests/test_tuned_gzip.py	2013-07-09 07:58:10 +0000
@@ -106,14 +106,17 @@
 class TestToGzip(tests.TestCase):
 
     def assertToGzip(self, chunks):
-        bytes = ''.join(chunks)
+        raw_bytes = ''.join(chunks)
         gzfromchunks = tuned_gzip.chunks_to_gzip(chunks)
-        gzfrombytes = tuned_gzip.bytes_to_gzip(bytes)
+        gzfrombytes = tuned_gzip.bytes_to_gzip(raw_bytes)
         self.assertEqual(gzfrombytes, gzfromchunks)
         decoded = self.applyDeprecated(
             symbol_versioning.deprecated_in((2, 3, 0)),
             tuned_gzip.GzipFile, fileobj=StringIO(gzfromchunks)).read()
-        self.assertEqual(bytes, decoded)
+        lraw, ldecoded = len(raw_bytes), len(decoded)
+        self.assertEqual(lraw, ldecoded,
+                         'Expecting data length %d, got %d' % (lraw, ldecoded))
+        self.assertEqual(raw_bytes, decoded)
 
     def test_single_chunk(self):
         self.assertToGzip(['a modest chunk\nwith some various\nbits\n'])



More information about the bazaar-commits mailing list