()
| 315 | |
| 316 | |
| 317 | def 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 | |
| 331 | def test_line_decoder_crnl(): |
nothing calls this directly
no test coverage detected