(tmpfile: BinaryIO)
| 1696 | |
| 1697 | |
| 1698 | def test_encodedfile_writelines(tmpfile: BinaryIO) -> None: |
| 1699 | ef = capture.EncodedFile(tmpfile, encoding="utf-8") |
| 1700 | with pytest.raises(TypeError): |
| 1701 | ef.writelines([b"line1", b"line2"]) # type: ignore[list-item] |
| 1702 | assert ef.writelines(["line3", "line4"]) is None # type: ignore[func-returns-value] |
| 1703 | ef.flush() |
| 1704 | tmpfile.seek(0) |
| 1705 | assert tmpfile.read() == b"line3line4" |
| 1706 | tmpfile.close() |
| 1707 | with pytest.raises(ValueError): |
| 1708 | ef.read() |
| 1709 | |
| 1710 | |
| 1711 | def test__get_multicapture() -> None: |
nothing calls this directly
no test coverage detected