Files
mtusi2026lab4/evidence/png-validation-fix/before.txt
T

19 lines
942 B
Plaintext

F [100%]
=================================== FAILURES ===================================
_____________ test_png_with_valid_crc_and_invalid_zlib_is_rejected _____________
async def test_png_with_valid_crc_and_invalid_zlib_is_rejected() -> None:
assert len(BROKEN_PNG) == 74
with Image.open(BytesIO(BROKEN_PNG)) as image:
image.verify()
with Image.open(BytesIO(BROKEN_PNG)) as image, pytest.raises(OSError):
image.load()
> with pytest.raises(UnsupportedImage):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E Failed: DID NOT RAISE UnsupportedImage
student-tests/unit/test_image_inspection.py:18: Failed
=========================== short test summary info ============================
FAILED student-tests/unit/test_image_inspection.py::test_png_with_valid_crc_and_invalid_zlib_is_rejected
1 failed in 0.15s