MCPcopy
hub / github.com/encode/httpx / test_line_decoder_cr

Function test_line_decoder_cr

tests/test_decoders.py:317–328  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

315
316
317def test_line_decoder_cr():
318 response = httpx.Response(200, content=[b"", b"a\r\rb\rc"])
319 assert list(response.iter_lines()) == ["a", "", "b", "c"]
320
321 response = httpx.Response(200, content=[b"", b"a\r\rb\rc\r"])
322 assert list(response.iter_lines()) == ["a", "", "b", "c"]
323
324 # Issue #1033
325 response = httpx.Response(
326 200, content=[b"", b"12345\r", b"foo ", b"bar ", b"baz\r"]
327 )
328 assert list(response.iter_lines()) == ["12345", "foo bar baz"]
329
330
331def test_line_decoder_crnl():

Callers

nothing calls this directly

Calls 1

iter_linesMethod · 0.95

Tested by

no test coverage detected