mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
tests/extmod: Get DecompIO test running on low-memory targets.
By changing the zlib header so that it uses a small (256 byte) window. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -20,13 +20,13 @@ print(inp.read())
|
||||
print(buf.seek(0, 1))
|
||||
|
||||
|
||||
# zlib bitstream
|
||||
inp = zlib.DecompIO(io.BytesIO(b"x\x9c30\xa0=\x00\x00\xb3q\x12\xc1"))
|
||||
# zlib bitstream (with 256 byte window size)
|
||||
inp = zlib.DecompIO(io.BytesIO(b"\x08\x9930\xa0=\x00\x00\xb3q\x12\xc1"))
|
||||
print(inp.read(10))
|
||||
print(inp.read())
|
||||
|
||||
# zlib bitstream, wrong checksum
|
||||
inp = zlib.DecompIO(io.BytesIO(b"x\x9c30\xa0=\x00\x00\xb3q\x12\xc0"))
|
||||
inp = zlib.DecompIO(io.BytesIO(b"\x08\x9930\xa0=\x00\x00\xb3q\x12\xc0"))
|
||||
try:
|
||||
print(inp.read())
|
||||
except OSError as e:
|
||||
|
||||
Reference in New Issue
Block a user