Commits

Philip Jenvey committed d721f54

maintain the old unused_data
(transplanted from 41bea643d6b454d6a9ca653b7e9b2022a45f5bf2)

Comments (0)

Files changed (2)

pypy/module/zlib/interp_zlib.py

         tail = data[unused_start:]
         if finished:
             self.unconsumed_tail = ''
-            self.unused_data = tail
+            self.unused_data += tail
         else:
             self.unconsumed_tail = tail
         return self.space.wrap(string)

pypy/module/zlib/test/test_zlib.py

         assert d.unused_data == 'spam' * 100
         assert s1 + s2 + s3 == self.expanded
         s4 = d.decompress('egg' * 50)
-        assert d.unused_data == 'egg' * 50
+        assert d.unused_data == ('spam' * 100) + ('egg' * 50)
         assert s4 == ''