fix gunzip_bytes doctest

This commit is contained in:
Mahmoud Hashemi 2015-07-30 03:23:43 -07:00
parent d684be5379
commit a060a8abd5
1 changed files with 2 additions and 2 deletions

View File

@ -578,9 +578,9 @@ def gunzip_bytes(bytestring):
use this one-liner. Use this tried-and-true utility function to use this one-liner. Use this tried-and-true utility function to
decompress gzip from bytes. decompress gzip from bytes.
>>> ungzip_bytes(_EMPTY_GZIP_BYTES) == b'' >>> gunzip_bytes(_EMPTY_GZIP_BYTES) == b''
True True
>>> ungzip_bytes(_NON_EMPTY_GZIP_BYTES).rstrip() == b'bytesahoy!' >>> gunzip_bytes(_NON_EMPTY_GZIP_BYTES).rstrip() == b'bytesahoy!'
True True
""" """
return zlib.decompress(bytestring, 16 + zlib.MAX_WBITS) return zlib.decompress(bytestring, 16 + zlib.MAX_WBITS)