MCPcopy
hub / github.com/urllib3/urllib3 / test_chunked_decoding_zstd

Method test_chunked_decoding_zstd

test/test_response.py:592–606  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

590
591 @onlyZstd()
592 def test_chunked_decoding_zstd(self) -> None:
593 data = zstd_compress(b"foobarbaz")
594
595 fp = BytesIO(data)
596 r = HTTPResponse(
597 fp, headers={"content-encoding": "zstd"}, preload_content=False
598 )
599
600 ret = b""
601
602 for _ in range(100):
603 ret += r.read(1)
604 if r.closed:
605 break
606 assert ret == b"foobarbaz"
607
608 decode_param_set = [
609 b"foo",

Callers

nothing calls this directly

Calls 3

readMethod · 0.95
HTTPResponseClass · 0.90
zstd_compressFunction · 0.85

Tested by

no test coverage detected