Archive the PNG validation fix and record offline evidence

This commit is contained in:
Artyom
2026-11-06 13:00:51 +03:00
parent 9387c3d82a
commit 7342d5d97a
21 changed files with 279 additions and 2 deletions
+18
View File
@@ -0,0 +1,18 @@
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