mirror of https://github.com/mahmoud/boltons.git
fix gunzip_bytes doctest
This commit is contained in:
parent
d684be5379
commit
a060a8abd5
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue