[pypy-svn] r46865 - pypy/dist/pypy/rlib/test
arigo at codespeak.net
arigo at codespeak.net
Tue Sep 25 18:30:16 CEST 2007
Author: arigo
Date: Tue Sep 25 18:30:15 2007
New Revision: 46865
Modified:
pypy/dist/pypy/rlib/test/test_rzlib.py
Log:
Another test.
Modified: pypy/dist/pypy/rlib/test/test_rzlib.py
==============================================================================
--- pypy/dist/pypy/rlib/test/test_rzlib.py (original)
+++ pypy/dist/pypy/rlib/test/test_rzlib.py Tue Sep 25 18:30:15 2007
@@ -93,6 +93,19 @@
assert bytes == compressed
+def test_compression_lots_of_data():
+ """
+ Test compression of more data that fits in a single internal output buffer.
+ """
+ expanded = repr(range(20000))
+ compressed = zlib.compress(expanded)
+ print len(expanded), '=>', len(compressed)
+ stream = rzlib.deflateInit()
+ bytes = rzlib.compress(stream, expanded, rzlib.Z_FINISH)
+ rzlib.deflateEnd(stream)
+ assert bytes == compressed
+
+
##def test_decompression(self):
## """
## zlib.decompressobj should return an object which can be used to
More information about the Pypy-commit
mailing list