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

Method test_chunked_decoding_zstd

test/test_response.py:592–606  ·  test/test_response.py::TestResponse.test_chunked_decoding_zstd
(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

readMethod · 0.95
HTTPResponseClass · 0.90
zstd_compressFunction · 0.85

Tested by

no test coverage detected