Files
mtusi2026lab4/evidence/03-image-tests.txt
T

68 lines
5.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Разбор изображений и сверка с Pillow внутри образа API
# дата: 2026-10-31T00:56Z, чистый clone
# стенд: Apple M3 Pro, 11 CPU, 18 GB RAM, macOS 26.1, Docker 29.3.0, Compose 5.1.0
$ make test-images
COPYFILE_DISABLE=1 tar -cf - src/images.py student-tests/samples.py student-tests/image tests/fixtures/sample.png | \
docker run --rm -i --entrypoint sh mtusi-messenger:lab4 -c 'cd /tmp && tar -xf - && python -m unittest discover -s student-tests/image -v'
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
test_cut_files (test_against_pillow.AgreementTest.test_cut_files) ... /usr/local/lib/python3.13/site-packages/PIL/TiffImagePlugin.py:982: UserWarning: Corrupt EXIF data. Expecting to read 4 bytes but only got 0.
warnings.warn(str(msg))
обрезка: принято 370, отвергнуто 2110, принято вопреки Pillow 0
ok
test_jpeg_with_headers_rebuilt (test_against_pillow.AgreementTest.test_jpeg_with_headers_rebuilt) ... JPEG с настоящими заголовками: принято 792, отвергнуто 8, принято вопреки Pillow 0
ok
test_png_chunks_shuffled (test_against_pillow.AgreementTest.test_png_chunks_shuffled) ... порядок блоков PNG: принято 0, отвергнуто 600, принято вопреки Pillow 0
ok
test_png_with_recomputed_crc (test_against_pillow.AgreementTest.test_png_with_recomputed_crc)
Самый важный случай: заголовок и CRC верны, испорчено только содержимое. Именно такой файл и был в замечании. ... ok
test_random_bytes_changed (test_against_pillow.AgreementTest.test_random_bytes_changed) ... PNG с верными CRC: принято 1354, отвергнуто 146, принято вопреки Pillow 0
ok
test_every_valid_file_is_accepted (test_against_pillow.ValidFilesTest.test_every_valid_file_is_accepted) ... замена байтов: принято 2218, отвергнуто 3982, принято вопреки Pillow 0
ok
test_jpeg_without_frame_or_scan (test_images.BrokenImagesTest.test_jpeg_without_frame_or_scan) ... ok
test_not_images (test_images.BrokenImagesTest.test_not_images) ... ok
test_png_bad_crc (test_images.BrokenImagesTest.test_png_bad_crc) ... ok
test_png_data_after_compressed_stream_in_zero_size (test_images.BrokenImagesTest.test_png_data_after_compressed_stream_in_zero_size) ... ok
test_png_data_after_end (test_images.BrokenImagesTest.test_png_data_after_end) ... ok
test_png_data_is_not_zlib (test_images.BrokenImagesTest.test_png_data_is_not_zlib) ... ok
test_png_with_wrong_amount_of_pixels (test_images.BrokenImagesTest.test_png_with_wrong_amount_of_pixels) ... ok
test_png_zero_size (test_images.BrokenImagesTest.test_png_zero_size) ... ok
test_random_corruption_never_crashes (test_images.BrokenImagesTest.test_random_corruption_never_crashes) ... ok
test_truncated (test_images.BrokenImagesTest.test_truncated) ... ok
test_big_frame_with_tiny_scan (test_images.JpegContentTest.test_big_frame_with_tiny_scan) ... ok
test_broken_frame_header (test_images.JpegContentTest.test_broken_frame_header) ... ok
test_scan_replaced_by_almost_nothing (test_images.JpegContentTest.test_scan_replaced_by_almost_nothing) ... ok
test_too_many_scans (test_images.JpegContentTest.test_too_many_scans) ... ok
test_truncated_with_end_marker_added (test_images.JpegContentTest.test_truncated_with_end_marker_added) ... ok
test_without_huffman_tables_like_mjpeg (test_images.JpegContentTest.test_without_huffman_tables_like_mjpeg) ... ok
test_without_quantization_tables (test_images.JpegContentTest.test_without_quantization_tables) ... ok
test_jpeg_over_limit (test_images.PixelLimitTest.test_jpeg_over_limit) ... ok
test_limit_is_exact (test_images.PixelLimitTest.test_limit_is_exact) ... ok
test_png_bomb_is_rejected_before_unpacking (test_images.PixelLimitTest.test_png_bomb_is_rejected_before_unpacking) ... ok
test_all_valid_filters (test_images.PngContentTest.test_all_valid_filters) ... ok
test_bad_filter_in_any_row (test_images.PngContentTest.test_bad_filter_in_any_row) ... ok
test_chunk_order (test_images.PngContentTest.test_chunk_order) ... ok
test_filter_check_crosses_inflate_blocks (test_images.PngContentTest.test_filter_check_crosses_inflate_blocks) ... ok
test_garbage_after_compressed_data (test_images.PngContentTest.test_garbage_after_compressed_data) ... ok
test_interlaced (test_images.PngContentTest.test_interlaced) ... ok
test_many_short_rows_are_checked_quickly (test_images.PngContentTest.test_many_short_rows_are_checked_quickly) ... ok
test_palette_rules (test_images.PngContentTest.test_palette_rules) ... ok
test_course_fixture (test_images.RealImagesTest.test_course_fixture) ... ok
test_jpeg_with_data_after_end (test_images.RealImagesTest.test_jpeg_with_data_after_end) ... ok
test_marker_on_block_border (test_images.RealImagesTest.test_marker_on_block_border) ... ok
test_real_images_are_accepted (test_images.RealImagesTest.test_real_images_are_accepted) ... ok
test_jpeg_without_image_data (test_images.ReviewCasesTest.test_jpeg_without_image_data) ... ok
test_png_with_invalid_filter_byte (test_images.ReviewCasesTest.test_png_with_invalid_filter_byte) ... ok
----------------------------------------------------------------------
Ran 40 tests in 0.952s
OK