summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-08-31 04:35:24 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-08-31 04:35:24 (GMT)
commit6d362b25c5125070ddd58f0bfaf79cb67e4f2cd4 (patch)
treebf36e5ac8c56423927d48653053c48cf4aa4355c /Lib
parent9d12ab5c3ce50013dac0af03c3a1bf061aaa9731 (diff)
downloadcpython-6d362b25c5125070ddd58f0bfaf79cb67e4f2cd4.zip
cpython-6d362b25c5125070ddd58f0bfaf79cb67e4f2cd4.tar.gz
cpython-6d362b25c5125070ddd58f0bfaf79cb67e4f2cd4.tar.bz2
SF bug #785222: zlib monotonic test
For smaller datasets, it is not always true the increasing the compression level always results in better compression. Removed the test which made this invalid assumption.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_zlib.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py
index c703964..3ad255f 100644
--- a/Lib/test/test_zlib.py
+++ b/Lib/test/test_zlib.py
@@ -96,17 +96,6 @@ class CompressTestCase(unittest.TestCase):
x = zlib.compress(data)
self.assertEqual(zlib.decompress(x), data)
- def test_monotonic(self):
- # higher compression levels should not expand compressed size
- data = hamlet_scene * 8 * 16
- last = length = len(zlib.compress(data, 0))
- self.failUnless(last > len(data), "compress level 0 always expands")
- for level in range(10):
- length = len(zlib.compress(data, level))
- self.failUnless(length <= last,
- 'compress level %d more effective than %d!' % (
- level-1, level))
- last = length