From b1123a54c1021ac40c1a809dc41681aa7b307bc9 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 9 Feb 2023 15:20:25 +1100 Subject: [PATCH] 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 --- tests/extmod/uzlib_decompio.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/extmod/uzlib_decompio.py b/tests/extmod/uzlib_decompio.py index 6a0aae8bcd..fae901aad0 100644 --- a/tests/extmod/uzlib_decompio.py +++ b/tests/extmod/uzlib_decompio.py @@ -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: