(self)
| 421 | assert MockPyEncoder.last.state.ysize == 200 |
| 422 | |
| 423 | def test_encode(self) -> None: |
| 424 | encoder = ImageFile.PyEncoder("") |
| 425 | with pytest.raises(NotImplementedError): |
| 426 | encoder.encode(0) |
| 427 | |
| 428 | bytes_consumed, errcode = encoder.encode_to_pyfd() |
| 429 | assert bytes_consumed == 0 |
| 430 | assert ImageFile.ERRORS[errcode] == "bad configuration" |
| 431 | |
| 432 | encoder._pushes_fd = True |
| 433 | with pytest.raises(NotImplementedError): |
| 434 | encoder.encode_to_pyfd() |
| 435 | |
| 436 | with pytest.raises(NotImplementedError): |
| 437 | encoder.encode_to_file(0, 0) |
| 438 | |
| 439 | def test_zero_height(self) -> None: |
| 440 | with pytest.raises(UnidentifiedImageError): |
nothing calls this directly
no test coverage detected