()
| 301 | |
| 302 | |
| 303 | def test_line_decoder_nl(): |
| 304 | response = httpx.Response(200, content=[b""]) |
| 305 | assert list(response.iter_lines()) == [] |
| 306 | |
| 307 | response = httpx.Response(200, content=[b"", b"a\n\nb\nc"]) |
| 308 | assert list(response.iter_lines()) == ["a", "", "b", "c"] |
| 309 | |
| 310 | # Issue #1033 |
| 311 | response = httpx.Response( |
| 312 | 200, content=[b"", b"12345\n", b"foo ", b"bar ", b"baz\n"] |
| 313 | ) |
| 314 | assert list(response.iter_lines()) == ["12345", "foo bar baz"] |
| 315 | |
| 316 | |
| 317 | def test_line_decoder_cr(): |
nothing calls this directly
no test coverage detected