diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2002-04-19 14:37:07 +0000 |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2002-04-19 14:37:07 +0000 |
commit | 11f9d24491d53e1ecfa5c55aa27ae0764df669f7 (patch) | |
tree | 3fddb26e2be612323d2771044532c9105a7458ca /Lib/test/test_zlib.py | |
parent | 8da0dedc7811b6fdf7e94fe95aa7a7dec3517ef2 (diff) | |
download | cpython-11f9d24491d53e1ecfa5c55aa27ae0764df669f7.tar.gz |
Fix SF #544995 (zlib crash on second flush call)
Bug fix by mhammond.
Bug fix candidate for 2.2, not present in 2.1.
Diffstat (limited to 'Lib/test/test_zlib.py')
-rw-r--r-- | Lib/test/test_zlib.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py index 88815160f8..35bca88432 100644 --- a/Lib/test/test_zlib.py +++ b/Lib/test/test_zlib.py @@ -41,6 +41,12 @@ buf = buf * 16 co = zlib.compressobj(8, 8, -15) x1 = co.compress(buf) x2 = co.flush() +try: + co.flush() + print "Oops - second flush worked when it should not have!" +except zlib.error: + pass + x = x1 + x2 dc = zlib.decompressobj(-15) |