Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r62922:41bea643d6b4
Date: 2013-04-01 18:51 -0700
http://bitbucket.org/pypy/pypy/changeset/41bea643d6b4/

Log:    maintain the old unused_data

diff --git a/pypy/module/zlib/interp_zlib.py b/pypy/module/zlib/interp_zlib.py
--- a/pypy/module/zlib/interp_zlib.py
+++ b/pypy/module/zlib/interp_zlib.py
@@ -281,7 +281,7 @@
         tail = data[unused_start:]
         if finished:
             self.unconsumed_tail = b''
-            self.unused_data = tail
+            self.unused_data += tail
         else:
             self.unconsumed_tail = tail
         return self.space.wrapbytes(string)
diff --git a/pypy/module/zlib/test/test_zlib.py 
b/pypy/module/zlib/test/test_zlib.py
--- a/pypy/module/zlib/test/test_zlib.py
+++ b/pypy/module/zlib/test/test_zlib.py
@@ -176,7 +176,7 @@
         assert d.unused_data == b'spam' * 100
         assert s1 + s2 + s3 == self.expanded
         s4 = d.decompress(b'egg' * 50)
-        assert d.unused_data == (b'spam' * 100) + (b'egg' * 50), d.unused_data
+        assert d.unused_data == (b'spam' * 100) + (b'egg' * 50)
         assert s4 == b''
 
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to