Source: pypdf2 Version: 2.12.1-4 Severity: serious Justification: FTBFS Tags: trixie sid ftbfs User: lu...@debian.org Usertags: ftbfs-20240313 ftbfs-trixie
Hi, During a rebuild of all packages in sid, your package failed to build on amd64. Relevant part (hopefully): > make[1]: Entering directory '/<<PKGBUILDDIR>>' > py3versions: no X-Python3-Version in control file, using supported versions > py3versions: no X-Python3-Version in control file, using supported versions > pytest-3 tests --cov --cov-report term-missing -vv > ============================= test session starts > ============================== > platform linux -- Python 3.11.8, pytest-8.0.2, pluggy-1.4.0 -- > /usr/bin/python3 > cachedir: .pytest_cache > rootdir: /<<PKGBUILDDIR>> > configfile: pyproject.toml > plugins: cov-4.1.0 > collecting ... collected 592 items > > tests/test_cmap.py::test_compute_space_width PASSED [ > 0%] > tests/test_cmap.py::test_parse_to_unicode_process_rg PASSED [ > 0%] > tests/test_cmap.py::test_parse_encoding_advanced_encoding_not_implemented > PASSED [ 0%] > tests/test_cmap.py::test_get_font_width_from_default PASSED [ > 0%] > tests/test_cmap.py::test_multiline_bfrange PASSED [ > 0%] > tests/test_cmap.py::test_bfchar_on_2_chars PASSED [ > 1%] > tests/test_cmap.py::test_ascii_charset PASSED [ > 1%] > tests/test_cmap.py::test_iss1370 PASSED [ > 1%] > tests/test_cmap.py::test_iss1379 PASSED [ > 1%] > tests/test_constants.py::test_slash_prefix PASSED [ > 1%] > tests/test_encryption.py::test_encryption[unencrypted.pdf-False] PASSED [ > 1%] > tests/test_encryption.py::test_encryption[r2-empty-password.pdf-False] PASSED > [ 2%] > tests/test_encryption.py::test_encryption[r3-empty-password.pdf-False] PASSED > [ 2%] > tests/test_encryption.py::test_encryption[r2-user-password.pdf-False] PASSED > [ 2%] > tests/test_encryption.py::test_encryption[r2-owner-password.pdf-False] PASSED > [ 2%] > tests/test_encryption.py::test_encryption[r3-user-password.pdf-False] PASSED > [ 2%] > tests/test_encryption.py::test_encryption[r4-user-password.pdf-False] PASSED > [ 2%] > tests/test_encryption.py::test_encryption[r4-owner-password.pdf-False] PASSED > [ 3%] > tests/test_encryption.py::test_encryption[r4-aes-user-password.pdf-True] > PASSED [ 3%] > tests/test_encryption.py::test_encryption[r5-empty-password.pdf-True] PASSED > [ 3%] > tests/test_encryption.py::test_encryption[r5-user-password.pdf-True] PASSED [ > 3%] > tests/test_encryption.py::test_encryption[r5-owner-password.pdf-True] PASSED > [ 3%] > tests/test_encryption.py::test_encryption[r6-empty-password.pdf-True] PASSED > [ 3%] > tests/test_encryption.py::test_encryption[r6-user-password.pdf-True] PASSED [ > 4%] > tests/test_encryption.py::test_encryption[r6-owner-password.pdf-True] PASSED > [ 4%] > tests/test_encryption.py::test_both_password[r6-both-passwords.pdf-foo-bar] > SKIPPED [ 4%] > tests/test_encryption.py::test_get_page_of_encrypted_file_new_algorithm[crazyones-encrypted-256.pdf-password0] > SKIPPED [ 4%] > tests/test_encryption.py::test_get_page_of_encrypted_file_new_algorithm[crazyones-encrypted-256.pdf-password1] > SKIPPED [ 4%] > tests/test_encryption.py::test_encryption_merge[names0] SKIPPED (No > pycryptodome) [ > 4%] > tests/test_encryption.py::test_encrypt_decrypt_class[CryptRC4] PASSED [ > 5%] > tests/test_encryption.py::test_decrypt_not_decrypted_pdf PASSED [ > 5%] > tests/test_encryption.py::test_generate_values PASSED [ > 5%] > tests/test_filters.py::test_FlateDecode[1-abcdefghijklmnopqrstuvwxyz] PASSED > [ 5%] > tests/test_filters.py::test_FlateDecode[1-ABCDEFGHIJKLMNOPQRSTUVWXYZ] PASSED > [ 5%] > tests/test_filters.py::test_FlateDecode[1-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ] > PASSED [ 5%] > tests/test_filters.py::test_FlateDecode[1-0123456789] PASSED [ > 6%] > tests/test_filters.py::test_FlateDecode[1-0123456789abcdefABCDEF] PASSED [ > 6%] > tests/test_filters.py::test_FlateDecode[1-!"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~] > PASSED [ 6%] > tests/test_filters.py::test_FlateDecode[1- \t\n\r\x0b\x0c] PASSED [ > 6%] > tests/test_filters.py::test_FlateDecode_unsupported_predictor PASSED [ > 6%] > tests/test_filters.py::test_FlateDecode_decompress_array_params[params0] > PASSED [ 6%] > tests/test_filters.py::test_FlateDecode_decompress_array_params[params1] > PASSED [ 7%] > tests/test_filters.py::test_FlateDecode_decompress_array_params[a] PASSED [ > 7%] > tests/test_filters.py::test_ASCIIHexDecode[empty] PASSED [ > 7%] > tests/test_filters.py::test_ASCIIHexDecode[ascii_lowercase] PASSED [ > 7%] > tests/test_filters.py::test_ASCIIHexDecode[ascii_uppercase] PASSED [ > 7%] > tests/test_filters.py::test_ASCIIHexDecode[ascii_letters] PASSED [ > 7%] > tests/test_filters.py::test_ASCIIHexDecode[digits] PASSED [ > 8%] > tests/test_filters.py::test_ASCIIHexDecode[digits_whitespace] PASSED [ > 8%] > tests/test_filters.py::test_ASCIIHexDecode[hexdigits] PASSED [ > 8%] > tests/test_filters.py::test_ASCIIHexDecode[whitespace] PASSED [ > 8%] > tests/test_filters.py::test_ASCIIHexDecode_no_eod PASSED [ > 8%] > tests/test_filters.py::test_ASCII85Decode_with_overflow XFAIL [ > 8%] > tests/test_filters.py::test_ASCII85Decode_five_zero_bytes PASSED [ > 9%] > tests/test_filters.py::test_CCITParameters PASSED [ > 9%] > tests/test_filters.py::test_CCIT_get_parameters[None-0] PASSED [ > 9%] > tests/test_filters.py::test_CCIT_get_parameters[parameters1-1] PASSED [ > 9%] > tests/test_filters.py::test_CCITTFaxDecode PASSED [ > 9%] > tests/test_filters.py::test_decompress_zlib_error PASSED [ > 9%] > tests/test_filters.py::test_lzw_decode_neg1 PASSED [ > 10%] > tests/test_filters.py::test_issue_399 PASSED [ > 10%] > tests/test_filters.py::test_image_without_imagemagic PASSED [ > 10%] > tests/test_generic.py::test_float_object_exception PASSED [ > 10%] > tests/test_generic.py::test_number_object_exception PASSED [ > 10%] > tests/test_generic.py::test_number_object_no_exception PASSED [ > 10%] > tests/test_generic.py::test_create_string_object_exception PASSED [ > 11%] > tests/test_generic.py::test_boolean_object[true-true-4] PASSED [ > 11%] > tests/test_generic.py::test_boolean_object[false-false-5] PASSED [ > 11%] > tests/test_generic.py::test_boolean_object_write PASSED [ > 11%] > tests/test_generic.py::test_boolean_eq PASSED [ > 11%] > tests/test_generic.py::test_boolean_object_exception PASSED [ > 11%] > tests/test_generic.py::test_array_object_exception PASSED [ > 12%] > tests/test_generic.py::test_null_object_exception PASSED [ > 12%] > tests/test_generic.py::test_indirect_object_premature[] PASSED [ > 12%] > tests/test_generic.py::test_indirect_object_premature[False] PASSED [ > 12%] > tests/test_generic.py::test_indirect_object_premature[foo ] PASSED [ > 12%] > tests/test_generic.py::test_indirect_object_premature[foo ] PASSED [ > 13%] > tests/test_generic.py::test_indirect_object_premature[foo bar] PASSED [ > 13%] > tests/test_generic.py::test_readHexStringFromStream PASSED [ > 13%] > tests/test_generic.py::test_readHexStringFromStream_exception PASSED [ > 13%] > tests/test_generic.py::test_readStringFromStream_exception PASSED [ > 13%] > tests/test_generic.py::test_readStringFromStream_not_in_escapedict_no_digit > PASSED [ 13%] > tests/test_generic.py::test_readStringFromStream_multichar_eol PASSED [ > 14%] > tests/test_generic.py::test_readStringFromStream_multichar_eol2 PASSED [ > 14%] > tests/test_generic.py::test_readStringFromStream_excape_digit PASSED [ > 14%] > tests/test_generic.py::test_readStringFromStream_excape_digit2 PASSED [ > 14%] > tests/test_generic.py::test_NameObject PASSED [ > 14%] > tests/test_generic.py::test_destination_fit_r PASSED [ > 14%] > tests/test_generic.py::test_destination_fit_v PASSED [ > 15%] > tests/test_generic.py::test_destination_exception PASSED [ > 15%] > tests/test_generic.py::test_outline_item_write_to_stream PASSED [ > 15%] > tests/test_generic.py::test_encode_pdfdocencoding_keyerror PASSED [ > 15%] > tests/test_generic.py::test_read_object_comment_exception PASSED [ > 15%] > tests/test_generic.py::test_read_object_empty PASSED [ > 15%] > tests/test_generic.py::test_read_object_invalid PASSED [ > 16%] > tests/test_generic.py::test_read_object_comment PASSED [ > 16%] > tests/test_generic.py::test_ByteStringObject PASSED [ > 16%] > tests/test_generic.py::test_DictionaryObject_key_is_no_pdfobject PASSED [ > 16%] > tests/test_generic.py::test_DictionaryObject_xmp_meta PASSED [ > 16%] > tests/test_generic.py::test_DictionaryObject_value_is_no_pdfobject PASSED [ > 16%] > tests/test_generic.py::test_DictionaryObject_setdefault_key_is_no_pdfobject > PASSED [ 17%] > tests/test_generic.py::test_DictionaryObject_setdefault_value_is_no_pdfobject > PASSED [ 17%] > tests/test_generic.py::test_DictionaryObject_setdefault_value PASSED [ > 17%] > tests/test_generic.py::test_DictionaryObject_read_from_stream PASSED [ > 17%] > tests/test_generic.py::test_DictionaryObject_read_from_stream_broken PASSED [ > 17%] > tests/test_generic.py::test_DictionaryObject_read_from_stream_unexpected_end > PASSED [ 17%] > tests/test_generic.py::test_DictionaryObject_read_from_stream_stream_no_newline > PASSED [ 18%] > tests/test_generic.py::test_DictionaryObject_read_from_stream_stream_no_stream_length[True] > PASSED [ 18%] > tests/test_generic.py::test_DictionaryObject_read_from_stream_stream_no_stream_length[False] > PASSED [ 18%] > tests/test_generic.py::test_DictionaryObject_read_from_stream_stream_stream_valid[True-6-False] > PASSED [ 18%] > tests/test_generic.py::test_DictionaryObject_read_from_stream_stream_stream_valid[True-10-False] > PASSED [ 18%] > tests/test_generic.py::test_DictionaryObject_read_from_stream_stream_stream_valid[True-4-True] > PASSED [ 18%] > tests/test_generic.py::test_DictionaryObject_read_from_stream_stream_stream_valid[False-6-False] > PASSED [ 19%] > tests/test_generic.py::test_DictionaryObject_read_from_stream_stream_stream_valid[False-10-False] > PASSED [ 19%] > tests/test_generic.py::test_RectangleObject PASSED [ > 19%] > tests/test_generic.py::test_TextStringObject_exc PASSED [ > 19%] > tests/test_generic.py::test_TextStringObject_autodetect_utf16 PASSED [ > 19%] > tests/test_generic.py::test_remove_child_not_in_tree PASSED [ > 19%] > tests/test_generic.py::test_remove_child_not_in_that_tree PASSED [ > 20%] > tests/test_generic.py::test_remove_child_not_found_in_tree PASSED [ > 20%] > tests/test_generic.py::test_remove_child_found_in_tree PASSED [ > 20%] > tests/test_generic.py::test_remove_child_in_tree PASSED [ > 20%] > tests/test_generic.py::test_dict_read_from_stream PASSED [ > 20%] > tests/test_generic.py::test_parse_content_stream_peek_percentage PASSED [ > 20%] > tests/test_generic.py::test_read_inline_image_no_has_q PASSED [ > 21%] > tests/test_generic.py::test_read_inline_image_loc_neg_1 PASSED [ > 21%] > tests/test_generic.py::test_text_string_write_to_stream PASSED [ > 21%] > tests/test_generic.py::test_name_object_read_from_stream_unicode_error PASSED > [ 21%] > tests/test_generic.py::test_bool_repr PASSED [ > 21%] > tests/test_generic.py::test_issue_997 PASSED [ > 21%] > tests/test_generic.py::test_annotation_builder_free_text PASSED [ > 22%] > tests/test_generic.py::test_annotation_builder_line PASSED [ > 22%] > tests/test_generic.py::test_annotation_builder_square PASSED [ > 22%] > tests/test_generic.py::test_annotation_builder_link PASSED [ > 22%] > tests/test_generic.py::test_annotation_builder_text PASSED [ > 22%] > tests/test_generic.py::test_CheckboxRadioButtonAttributes_opt PASSED [ > 22%] > tests/test_generic.py::test_name_object_invalid_decode PASSED [ > 23%] > tests/test_generic.py::test_indirect_object_invalid_read PASSED [ > 23%] > tests/test_generic.py::test_create_string_object_force PASSED [ > 23%] > tests/test_generic.py::test_float_object_decimal_to_string[0.000000-0] PASSED > [ 23%] > tests/test_generic.py::test_float_object_decimal_to_string[0.0-0_0] PASSED [ > 23%] > tests/test_generic.py::test_float_object_decimal_to_string[1.0-1_0] PASSED [ > 23%] > tests/test_generic.py::test_float_object_decimal_to_string[0.123000-0.123] > PASSED [ 24%] > tests/test_generic.py::test_float_object_decimal_to_string[0.000123000-0.000123] > PASSED [ 24%] > tests/test_generic.py::test_float_object_decimal_to_string[0.0-0_1] PASSED [ > 24%] > tests/test_generic.py::test_float_object_decimal_to_string[0-0] PASSED [ > 24%] > tests/test_generic.py::test_float_object_decimal_to_string[1-1] PASSED [ > 24%] > tests/test_generic.py::test_float_object_decimal_to_string[1.0-1_1] PASSED [ > 25%] > tests/test_generic.py::test_float_object_decimal_to_string[1.01-1.01] PASSED > [ 25%] > tests/test_generic.py::test_float_object_decimal_to_string[1.010-1.01] PASSED > [ 25%] > tests/test_generic.py::test_float_object_decimal_to_string[0000.0000-0] > PASSED [ 25%] > tests/test_generic.py::test_float_object_decimal_to_string[0.10101010-0.1010101] > PASSED [ 25%] > tests/test_generic.py::test_float_object_decimal_to_string[50000000000-50000000000] > PASSED [ 25%] > tests/test_generic.py::test_float_object_decimal_to_string[99900000000000000123-99900000000000000123] > PASSED [ 26%] > tests/test_generic.py::test_float_object_decimal_to_string[99900000000000000123.456000-99900000000000000123.456] > PASSED [ 26%] > tests/test_generic.py::test_float_object_decimal_to_string[0.00000000000000000000123-0.00000000000000000000123] > PASSED [ 26%] > tests/test_generic.py::test_float_object_decimal_to_string[0.00000000000000000000123000-0.00000000000000000000123] > PASSED [ 26%] > tests/test_generic.py::test_float_object_decimal_to_string[50032481330523882508234.00000000000000000000123000-50032481330523882508234.00000000000000000000123] > PASSED [ 26%] > tests/test_generic.py::test_float_object_decimal_to_string[928457298572093487502198745102973402987412908743.75249875981374981237498213740000-928457298572093487502198745102973402987412908743.7524987598137498123749821374] > PASSED [ 26%] > tests/test_javascript.py::test_add_js PASSED [ > 27%] > tests/test_javascript.py::test_added_js PASSED [ > 27%] > tests/test_merger.py::test_merger_operations_by_traditional_usage PASSED [ > 27%] > tests/test_merger.py::test_merger_operations_by_semi_traditional_usage PASSED > [ 27%] > tests/test_merger.py::test_merger_operation_by_new_usage PASSED [ > 27%] > tests/test_merger.py::test_merge_page_exception PASSED [ > 27%] > tests/test_merger.py::test_merge_page_tuple PASSED [ > 28%] > tests/test_merger.py::test_merge_write_closed_fh PASSED [ > 28%] > tests/test_merger.py::test_trim_outline_list PASSED [ > 28%] > tests/test_merger.py::test_zoom PASSED [ > 28%] > tests/test_merger.py::test_zoom_xyz_no_left PASSED [ > 28%] > tests/test_merger.py::test_outline_item PASSED [ > 28%] > tests/test_merger.py::test_trim_outline PASSED [ > 29%] > tests/test_merger.py::test1 PASSED [ > 29%] > tests/test_merger.py::test_sweep_recursion1 PASSED [ > 29%] > tests/test_merger.py::test_sweep_recursion2[https://corpora.tika.apache.org/base/docs/govdocs1/924/924794.pdf-tika-924794.pdf] > PASSED [ 29%] > tests/test_merger.py::test_sweep_recursion2[https://corpora.tika.apache.org/base/docs/govdocs1/924/924546.pdf-tika-924546.pdf] > PASSED [ 29%] > tests/test_merger.py::test_sweep_indirect_list_newobj_is_None PASSED [ > 29%] > tests/test_merger.py::test_iss1145 PASSED [ > 30%] > tests/test_merger.py::test_deprecate_bookmark_decorator_warning PASSED [ > 30%] > tests/test_merger.py::test_deprecate_bookmark_decorator_output PASSED [ > 30%] > tests/test_merger.py::test_iss1344 PASSED [ > 30%] > tests/test_page.py::test_read[001-trivial/minimal-document.pdf] PASSED [ > 30%] > tests/test_page.py::test_read[002-trivial-libre-office-writer/002-trivial-libre-office-writer.pdf] > PASSED [ 30%] > tests/test_page.py::test_read[003-pdflatex-image/pdflatex-image.pdf] PASSED [ > 31%] > tests/test_page.py::test_read[004-pdflatex-4-pages/pdflatex-4-pages.pdf] > PASSED [ 31%] > tests/test_page.py::test_read[006-pdflatex-outline/pdflatex-outline.pdf] > PASSED [ 31%] > tests/test_page.py::test_read[007-imagemagick-images/imagemagick-ASCII85Decode.pdf] > PASSED [ 31%] > tests/test_page.py::test_read[007-imagemagick-images/imagemagick-images.pdf] > PASSED [ 31%] > tests/test_page.py::test_read[007-imagemagick-images/imagemagick-CCITTFaxDecode.pdf] > PASSED [ 31%] > tests/test_page.py::test_read[007-imagemagick-images/imagemagick-lzw.pdf] > PASSED [ 32%] > tests/test_page.py::test_read[008-reportlab-inline-image/inline-image.pdf] > PASSED [ 32%] > tests/test_page.py::test_read[009-pdflatex-geotopo/GeoTopo.pdf] PASSED [ > 32%] > tests/test_page.py::test_read[010-pdflatex-forms/pdflatex-forms.pdf] PASSED [ > 32%] > tests/test_page.py::test_read[011-google-doc-document/google-doc-document.pdf] > PASSED [ 32%] > tests/test_page.py::test_read[012-libreoffice-form/libreoffice-form.pdf] > PASSED [ 32%] > tests/test_page.py::test_read[013-reportlab-overlay/reportlab-overlay.pdf] > PASSED [ 33%] > tests/test_page.py::test_read[014-outlines/mistitled_outlines_example.pdf] > PASSED [ 33%] > tests/test_page.py::test_read[015-arabic/habibi.pdf] PASSED [ > 33%] > tests/test_page.py::test_read[015-arabic/habibi-oneline-cmap.pdf] PASSED [ > 33%] > tests/test_page.py::test_read[016-libre-office-link/libre-office-link.pdf] > PASSED [ 33%] > tests/test_page.py::test_read[017-unreadable-meta-data/unreadablemetadata.pdf] > PASSED [ 33%] > tests/test_page.py::test_read[018-base64-image/base64image.pdf] PASSED [ > 34%] > tests/test_page.py::test_read[019-grayscale-image/grayscale-image.pdf] PASSED > [ 34%] > tests/test_page.py::test_page_operations[crazyones.pdf-None] PASSED [ > 34%] > tests/test_page.py::test_page_operations[attachment.pdf-None] PASSED [ > 34%] > tests/test_page.py::test_page_operations[libreoffice-writer-password.pdf-openpassword] > PASSED [ 34%] > tests/test_page.py::test_page_operations[imagemagick-images.pdf-None] PASSED > [ 34%] > tests/test_page.py::test_page_operations[imagemagick-lzw.pdf-None] PASSED [ > 35%] > tests/test_page.py::test_page_operations[reportlab-inline-image.pdf-None] > PASSED [ 35%] > tests/test_page.py::test_page_operations[https://arxiv.org/pdf/2201.00029.pdf-None] > PASSED [ 35%] > tests/test_page.py::test_transformation_equivalence PASSED [ > 35%] > tests/test_page.py::test_get_user_unit_property PASSED [ > 35%] > tests/test_page.py::test_page_transformations PASSED [ > 35%] > tests/test_page.py::test_compress_content_streams[pdf_path0-None] PASSED [ > 36%] > tests/test_page.py::test_compress_content_streams[pdf_path1-None] PASSED [ > 36%] > tests/test_page.py::test_compress_content_streams[pdf_path2-None] PASSED [ > 36%] > tests/test_page.py::test_compress_content_streams[pdf_path3-openpassword] > PASSED [ 36%] > tests/test_page.py::test_page_properties PASSED [ > 36%] > tests/test_page.py::test_page_rotation PASSED [ > 36%] > tests/test_page.py::test_page_scale PASSED [ > 37%] > tests/test_page.py::test_add_transformation_on_page_without_contents PASSED [ > 37%] > tests/test_page.py::test_multi_language PASSED [ > 37%] > tests/test_page.py::test_extract_text_single_quote_op PASSED [ > 37%] > tests/test_page.py::test_no_ressources_on_text_extract PASSED [ > 37%] > tests/test_page.py::test_iss_1142 PASSED [ > 38%] > tests/test_page.py::test_extract_text_page_pdf[https://corpora.tika.apache.org/base/docs/govdocs1/964/964029.pdf-tika-964029.pdf] > PASSED [ 38%] > tests/test_page.py::test_extract_text_page_pdf[https://corpora.tika.apache.org/base/docs/govdocs1/932/932446.pdf-tika-932446.pdf] > PASSED [ 38%] > tests/test_page.py::test_extract_text_page_pdf[https://github.com/py-pdf/PyPDF2/files/9150656/ST.2019.PDF-iss_1134.pdf] > PASSED [ 38%] > tests/test_page.py::test_extract_text_page_pdf[https://github.com/py-pdf/PyPDF2/files/9432350/Work.Flow.From.Check.to.QA.pdf-WFCA.pdf] > PASSED [ 38%] > tests/test_page.py::test_extract_text_page_pdf_impossible_decode_xform PASSED > [ 38%] > tests/test_page.py::test_extract_text_operator_t_star PASSED [ > 39%] > tests/test_page.py::test_extract_text_visitor_callbacks PASSED [ > 39%] > tests/test_page.py::test_get_fonts[pdf_path0-None-embedded0-unembedded0] > PASSED [ 39%] > tests/test_page.py::test_get_fonts[pdf_path1-None-embedded1-unembedded1] > PASSED [ 39%] > tests/test_page.py::test_get_fonts[pdf_path2-openpassword-embedded2-unembedded2] > PASSED [ 39%] > tests/test_page.py::test_get_fonts[pdf_path3-None-embedded3-unembedded3] > PASSED [ 39%] > tests/test_page.py::test_get_fonts[pdf_path4-None-embedded4-unembedded4] > PASSED [ 40%] > tests/test_page.py::test_get_fonts[pdf_path5-None-embedded5-unembedded5] > PASSED [ 40%] > tests/test_page.py::test_annotation_getter PASSED [ > 40%] > tests/test_page.py::test_annotation_setter PASSED [ > 40%] > tests/test_page.py::test_text_extraction_issue_1091 XFAIL (#1091) [ > 40%] > tests/test_page.py::test_empyt_password_1088 PASSED [ > 40%] > tests/test_page.py::test_arab_text_extraction XFAIL (#1088 / #1126) [ > 41%] > tests/test_page.py::test_read_link_annotation PASSED [ > 41%] > tests/test_page.py::test_no_resources PASSED [ > 41%] > tests/test_pagerange.py::test_equality PASSED [ > 41%] > tests/test_pagerange.py::test_str[page_range0-0:5] PASSED [ > 41%] > tests/test_pagerange.py::test_str[page_range1-0:5:2] PASSED [ > 41%] > tests/test_pagerange.py::test_str[-1--1:] PASSED [ > 42%] > tests/test_pagerange.py::test_str[0-0] PASSED [ > 42%] > tests/test_pagerange.py::test_repr[page_range0-PageRange('0:5')] PASSED [ > 42%] > tests/test_pagerange.py::test_repr[page_range1-PageRange('0:5:2')] PASSED [ > 42%] > tests/test_pagerange.py::test_equality_other_objectc PASSED [ > 42%] > tests/test_pagerange.py::test_idempotency PASSED [ > 42%] > tests/test_pagerange.py::test_str_init[42-expected0] PASSED [ > 43%] > tests/test_pagerange.py::test_str_init[1:2-expected1] PASSED [ > 43%] > tests/test_pagerange.py::test_str_init_error PASSED [ > 43%] > tests/test_pagerange.py::test_parse_filename_page_ranges[params0-expected0] > PASSED [ 43%] > tests/test_pagerange.py::test_parse_filename_page_ranges[params1-expected1] > PASSED [ 43%] > tests/test_pagerange.py::test_parse_filename_page_ranges_err PASSED [ > 43%] > tests/test_pagerange.py::test_addition[a0-b0-expected0] PASSED [ > 44%] > tests/test_pagerange.py::test_addition[a1-b1-expected1] PASSED [ > 44%] > tests/test_pagerange.py::test_addition[a2-b2-expected2] PASSED [ > 44%] > tests/test_pagerange.py::test_addition_gap[a0-b0] PASSED [ > 44%] > tests/test_pagerange.py::test_addition_gap[a1-b1] PASSED [ > 44%] > tests/test_pagerange.py::test_addition_non_page_range PASSED [ > 44%] > tests/test_pagerange.py::test_addition_stride PASSED [ > 45%] > tests/test_papersizes.py::test_din_a0 PASSED [ > 45%] > tests/test_papersizes.py::test_din_a_ratio[dimensions0] PASSED [ > 45%] > tests/test_papersizes.py::test_din_a_ratio[dimensions1] PASSED [ > 45%] > tests/test_papersizes.py::test_din_a_ratio[dimensions2] PASSED [ > 45%] > tests/test_papersizes.py::test_din_a_ratio[dimensions3] PASSED [ > 45%] > tests/test_papersizes.py::test_din_a_ratio[dimensions4] PASSED [ > 46%] > tests/test_papersizes.py::test_din_a_ratio[dimensions5] PASSED [ > 46%] > tests/test_papersizes.py::test_din_a_ratio[dimensions6] PASSED [ > 46%] > tests/test_papersizes.py::test_din_a_ratio[dimensions7] PASSED [ > 46%] > tests/test_papersizes.py::test_din_a_ratio[dimensions8] PASSED [ > 46%] > tests/test_papersizes.py::test_din_a_doubling[dimensions_a0-dimensions_b0] > PASSED [ 46%] > tests/test_papersizes.py::test_din_a_doubling[dimensions_a1-dimensions_b1] > PASSED [ 47%] > tests/test_papersizes.py::test_din_a_doubling[dimensions_a2-dimensions_b2] > PASSED [ 47%] > tests/test_papersizes.py::test_din_a_doubling[dimensions_a3-dimensions_b3] > PASSED [ 47%] > tests/test_papersizes.py::test_din_a_doubling[dimensions_a4-dimensions_b4] > PASSED [ 47%] > tests/test_papersizes.py::test_din_a_doubling[dimensions_a5-dimensions_b5] > PASSED [ 47%] > tests/test_papersizes.py::test_din_a_doubling[dimensions_a6-dimensions_b6] > PASSED [ 47%] > tests/test_papersizes.py::test_din_a_doubling[dimensions_a7-dimensions_b7] > PASSED [ 48%] > tests/test_reader.py::test_get_num_pages[selenium-PyPDF2-issue-177.pdf-1] > PASSED [ 48%] > tests/test_reader.py::test_get_num_pages[pdflatex-outline.pdf-4] PASSED [ > 48%] > tests/test_reader.py::test_read_metadata[crazyones] PASSED [ > 48%] > tests/test_reader.py::test_read_metadata[metadata] PASSED [ > 48%] > tests/test_reader.py::test_broken_meta_data[pdf_path0] PASSED [ > 48%] > tests/test_reader.py::test_get_annotations[src0] PASSED [ > 49%] > tests/test_reader.py::test_get_annotations[src1] PASSED [ > 49%] > tests/test_reader.py::test_get_attachments[src0-1] PASSED [ > 49%] > tests/test_reader.py::test_get_attachments[src1-0] PASSED [ > 49%] > tests/test_reader.py::test_get_outline[src0-9] PASSED [ > 49%] > tests/test_reader.py::test_get_outline[src1-0] PASSED [ > 50%] > tests/test_reader.py::test_get_images[pdflatex-outline.pdf-expected_images0] > PASSED [ 50%] > tests/test_reader.py::test_get_images[crazyones.pdf-expected_images1] PASSED > [ 50%] > tests/test_reader.py::test_get_images[git.pdf-expected_images2] PASSED [ > 50%] > tests/test_reader.py::test_get_images[imagemagick-lzw.pdf-expected_images3] > XFAIL [ 50%] > tests/test_reader.py::test_get_images[imagemagick-ASCII85Decode.pdf-expected_images4] > XFAIL [ 50%] > tests/test_reader.py::test_get_images[imagemagick-CCITTFaxDecode.pdf-expected_images5] > PASSED [ 51%] > tests/test_reader.py::test_get_images[src6-expected_images6] PASSED [ > 51%] > tests/test_reader.py::test_get_images_raw[True-False--1-False-warning_msgs0] > PASSED [ 51%] > tests/test_reader.py::test_get_images_raw[True-True--1-True-] FAILED [ > 51%] > tests/test_reader.py::test_get_images_raw[False-False--1-False-warning_msgs2] > PASSED [ 51%] > tests/test_reader.py::test_get_images_raw[False-True--1-False-warning_msgs3] > PASSED [ 51%] > tests/test_reader.py::test_get_images_raw[True-False-0-True-] FAILED [ > 52%] > tests/test_reader.py::test_get_images_raw[True-True-0-True-] FAILED [ > 52%] > tests/test_reader.py::test_get_images_raw[False-False-0-False-warning_msgs6] > PASSED [ 52%] > tests/test_reader.py::test_get_images_raw[False-True-0-False-warning_msgs7] > PASSED [ 52%] > tests/test_reader.py::test_issue297 PASSED [ > 52%] > tests/test_reader.py::test_get_page_of_encrypted_file[encrypted-file.pdf-test-False0] > PASSED [ 52%] > tests/test_reader.py::test_get_page_of_encrypted_file[encrypted-file.pdf-test-False1] > PASSED [ 53%] > tests/test_reader.py::test_get_page_of_encrypted_file[encrypted-file.pdf-qwerty-True0] > PASSED [ 53%] > tests/test_reader.py::test_get_page_of_encrypted_file[encrypted-file.pdf-qwerty-True1] > PASSED [ 53%] > tests/test_reader.py::test_get_form[form.pdf-expected0-expected_get_fields0] > PASSED [ 53%] > tests/test_reader.py::test_get_form[form_acrobatReader.pdf-expected1-expected_get_fields1] > PASSED [ 53%] > tests/test_reader.py::test_get_form[form_evince.pdf-expected2-expected_get_fields2] > PASSED [ 53%] > tests/test_reader.py::test_get_form[crazyones.pdf-expected3-None] PASSED [ > 54%] > tests/test_reader.py::test_get_page_number[form.pdf-0] PASSED [ > 54%] > tests/test_reader.py::test_get_page_number[pdflatex-outline.pdf-2] PASSED [ > 54%] > tests/test_reader.py::test_get_page_layout[form.pdf-None] PASSED [ > 54%] > tests/test_reader.py::test_get_page_layout[AutoCad_Simple.pdf-/SinglePage] > PASSED [ 54%] > tests/test_reader.py::test_get_page_mode[form.pdf-/UseNone] PASSED [ > 54%] > tests/test_reader.py::test_get_page_mode[crazyones.pdf-None] PASSED [ > 55%] > tests/test_reader.py::test_read_empty PASSED [ > 55%] > tests/test_reader.py::test_read_malformed_header PASSED [ > 55%] > tests/test_reader.py::test_read_malformed_body PASSED [ > 55%] > tests/test_reader.py::test_read_prev_0_trailer FAILED [ > 55%] > tests/test_reader.py::test_read_missing_startxref PASSED [ > 55%] > tests/test_reader.py::test_read_unknown_zero_pages FAILED [ > 56%] > tests/test_reader.py::test_read_encrypted_without_decryption PASSED [ > 56%] > tests/test_reader.py::test_get_destination_page_number PASSED [ > 56%] > tests/test_reader.py::test_do_not_get_stuck_on_large_files_without_start_xref > PASSED [ 56%] > tests/test_reader.py::test_decrypt_when_no_id PASSED [ > 56%] > tests/test_reader.py::test_reader_properties PASSED [ > 56%] > tests/test_reader.py::test_issue604[True] FAILED [ > 57%] > tests/test_reader.py::test_issue604[False] PASSED [ > 57%] > tests/test_reader.py::test_decode_permissions PASSED [ > 57%] > tests/test_reader.py::test_pages_attribute PASSED [ > 57%] > tests/test_reader.py::test_convert_to_int PASSED [ > 57%] > tests/test_reader.py::test_convert_to_int_error PASSED [ > 57%] > tests/test_reader.py::test_convertToInt_deprecated PASSED [ > 58%] > tests/test_reader.py::test_iss925 PASSED [ > 58%] > tests/test_reader.py::test_get_object PASSED [ > 58%] > tests/test_reader.py::test_extract_text_hello_world PASSED [ > 58%] > tests/test_reader.py::test_read_path PASSED [ > 58%] > tests/test_reader.py::test_read_not_binary_mode PASSED [ > 58%] > tests/test_reader.py::test_read_form_416 SKIPPED (No pycryptodome) [ > 59%] > tests/test_reader.py::test_extract_text_xref_issue_2 PASSED [ > 59%] > tests/test_reader.py::test_extract_text_xref_issue_3 PASSED [ > 59%] > tests/test_reader.py::test_extract_text_pdf15 PASSED [ > 59%] > tests/test_reader.py::test_extract_text_xref_table_21_bytes_clrf PASSED [ > 59%] > tests/test_reader.py::test_get_fields PASSED [ > 59%] > tests/test_reader.py::test_get_fields_read_else_block PASSED [ > 60%] > tests/test_reader.py::test_get_fields_read_else_block2 PASSED [ > 60%] > tests/test_reader.py::test_get_fields_read_else_block3 PASSED [ > 60%] > tests/test_reader.py::test_metadata_is_none PASSED [ > 60%] > tests/test_reader.py::test_get_fields_read_write_report PASSED [ > 60%] > tests/test_reader.py::test_xfa[src0] PASSED [ > 60%] > tests/test_reader.py::test_xfa[src1] PASSED [ > 61%] > tests/test_reader.py::test_xfa_non_empty PASSED [ > 61%] > tests/test_reader.py::test_header[src0-%PDF-1.5] PASSED [ > 61%] > tests/test_reader.py::test_header[src1-%PDF-1.5] PASSED [ > 61%] > tests/test_reader.py::test_outline_color PASSED [ > 61%] > tests/test_reader.py::test_outline_font_format PASSED [ > 61%] > tests/test_reader.py::test_outline_title_issue_1121 PASSED [ > 62%] > tests/test_reader.py::test_outline_count PASSED [ > 62%] > tests/test_reader.py::test_outline_missing_title PASSED [ > 62%] > tests/test_reader.py::test_named_destination PASSED [ > 62%] > tests/test_reader.py::test_outline_with_missing_named_destination PASSED [ > 62%] > tests/test_reader.py::test_outline_with_empty_action PASSED [ > 63%] > tests/test_reader.py::test_outline_with_invalid_destinations PASSED [ > 63%] > tests/test_reader.py::test_PdfReaderMultipleDefinitions PASSED [ > 63%] > tests/test_reader.py::test_wrong_password_error PASSED [ > 63%] > tests/test_reader.py::test_get_page_number_by_indirect PASSED [ > 63%] > tests/test_reader.py::test_corrupted_xref_table PASSED [ > 63%] > tests/test_reader.py::test_reader PASSED [ > 64%] > tests/test_reader.py::test_zeroing_xref PASSED [ > 64%] > tests/test_reader.py::test_thread PASSED [ > 64%] > tests/test_reader.py::test_build_outline_item PASSED [ > 64%] > tests/test_security.py::test_alg32_metadata_encrypt PASSED [ > 64%] > tests/test_security.py::test_alg32_no_metadata_encrypt PASSED [ > 64%] > tests/test_utils.py::test_skip_over_whitespace[stream0-False] PASSED [ > 65%] > tests/test_utils.py::test_skip_over_whitespace[stream1-False] PASSED [ > 65%] > tests/test_utils.py::test_skip_over_whitespace[stream2-True] PASSED [ > 65%] > tests/test_utils.py::test_skip_over_whitespace[stream3-True] PASSED [ > 65%] > tests/test_utils.py::test_skip_over_whitespace[stream4-True] PASSED [ > 65%] > tests/test_utils.py::test_skip_over_whitespace[stream5-True] PASSED [ > 65%] > tests/test_utils.py::test_read_until_whitespace PASSED [ > 66%] > tests/test_utils.py::test_skip_over_comment[stream0-] PASSED [ > 66%] > tests/test_utils.py::test_skip_over_comment[stream1-] PASSED [ > 66%] > tests/test_utils.py::test_skip_over_comment[stream2- ] PASSED [ > 66%] > tests/test_utils.py::test_skip_over_comment[stream3-bar] PASSED [ > 66%] > tests/test_utils.py::test_read_until_regex_premature_ending_raise PASSED [ > 66%] > tests/test_utils.py::test_read_until_regex_premature_ending_name PASSED [ > 67%] > tests/test_utils.py::test_matrix_multiply[a0-b0-expected0] PASSED [ > 67%] > tests/test_utils.py::test_matrix_multiply[a1-b1-expected1] PASSED [ > 67%] > tests/test_utils.py::test_matrix_multiply[a2-b2-expected2] PASSED [ > 67%] > tests/test_utils.py::test_mark_location PASSED [ > 67%] > tests/test_utils.py::test_hex_str PASSED [ > 67%] > tests/test_utils.py::test_b PASSED [ > 68%] > tests/test_utils.py::test_deprecate_no_replacement PASSED [ > 68%] > tests/test_utils.py::test_paeth_predictor[0-0-0-0] PASSED [ > 68%] > tests/test_utils.py::test_paeth_predictor[1-0-0-1] PASSED [ > 68%] > tests/test_utils.py::test_paeth_predictor[0-1-0-1] PASSED [ > 68%] > tests/test_utils.py::test_paeth_predictor[0-0-1-0] PASSED [ > 68%] > tests/test_utils.py::test_paeth_predictor[1-2-3-1] PASSED [ > 69%] > tests/test_utils.py::test_paeth_predictor[2-1-3-1] PASSED [ > 69%] > tests/test_utils.py::test_paeth_predictor[1-3-2-2] PASSED [ > 69%] > tests/test_utils.py::test_paeth_predictor[3-1-2-2] PASSED [ > 69%] > tests/test_utils.py::test_paeth_predictor[3-2-1-3] PASSED [ > 69%] > tests/test_utils.py::test_read_block_backwards_errs[-0-1] PASSED [ > 69%] > tests/test_utils.py::test_read_block_backwards_errs[a-0-1] PASSED [ > 70%] > tests/test_utils.py::test_read_block_backwards_errs[abc-0-10] PASSED [ > 70%] > tests/test_utils.py::test_read_block_backwards[abc-1-0--1] PASSED [ > 70%] > tests/test_utils.py::test_read_block_backwards[abc-1-1-a-0] PASSED [ > 70%] > tests/test_utils.py::test_read_block_backwards[abc-2-1-b-1] PASSED [ > 70%] > tests/test_utils.py::test_read_block_backwards[abc-2-2-ab-0] PASSED [ > 70%] > tests/test_utils.py::test_read_block_backwards[abc-3-1-c-2] PASSED [ > 71%] > tests/test_utils.py::test_read_block_backwards[abc-3-2-bc-1] PASSED [ > 71%] > tests/test_utils.py::test_read_block_backwards[abc-3-3-abc-0] PASSED [ > 71%] > tests/test_utils.py::test_read_block_backwards_at_start PASSED [ > 71%] > tests/test_utils.py::test_read_previous_line[0] PASSED [ > 71%] > tests/test_utils.py::test_read_previous_line[1] PASSED [ > 71%] > tests/test_utils.py::test_read_previous_line[2] PASSED [ > 72%] > tests/test_utils.py::test_read_previous_line[3] PASSED [ > 72%] > tests/test_utils.py::test_read_previous_line[4] PASSED [ > 72%] > tests/test_utils.py::test_read_previous_line[5] PASSED [ > 72%] > tests/test_utils.py::test_read_previous_line[6] PASSED [ > 72%] > tests/test_utils.py::test_read_previous_line[7] PASSED [ > 72%] > tests/test_utils.py::test_read_previous_line2 PASSED [ > 73%] > tests/test_utils.py::test_get_max_pdf_version_header PASSED [ > 73%] > tests/test_utils.py::test_read_block_backwards_exception PASSED [ > 73%] > tests/test_utils.py::test_deprecate_bookmark PASSED [ > 73%] > tests/test_utils.py::test_escapedcode_followed_by_int PASSED [ > 73%] > tests/test_utils.py::test_human_readable_bytes[123-123 Byte] PASSED [ > 73%] > tests/test_utils.py::test_human_readable_bytes[1234-1.2 kB] PASSED [ > 74%] > tests/test_utils.py::test_human_readable_bytes[123456-123.5 kB] PASSED [ > 74%] > tests/test_utils.py::test_human_readable_bytes[1234567-1.2 MB] PASSED [ > 74%] > tests/test_utils.py::test_human_readable_bytes[1234567890-1.2 GB] PASSED [ > 74%] > tests/test_utils.py::test_human_readable_bytes[1234567890000-1234.6 GB] > PASSED [ 74%] > tests/test_utils.py::test_file PASSED [ > 75%] > tests/test_workflows.py::test_basic_features PASSED [ > 75%] > tests/test_workflows.py::test_dropdown_items PASSED [ > 75%] > tests/test_workflows.py::test_PdfReaderFileLoad PASSED [ > 75%] > tests/test_workflows.py::test_PdfReaderJpegImage PASSED [ > 75%] > tests/test_workflows.py::test_decrypt PASSED [ > 75%] > tests/test_workflows.py::test_text_extraction_encrypted PASSED [ > 76%] > tests/test_workflows.py::test_rotate[0] PASSED [ > 76%] > tests/test_workflows.py::test_rotate[90] PASSED [ > 76%] > tests/test_workflows.py::test_rotate[180] PASSED [ > 76%] > tests/test_workflows.py::test_rotate[270] PASSED [ > 76%] > tests/test_workflows.py::test_rotate[360] PASSED [ > 76%] > tests/test_workflows.py::test_rotate[-90] PASSED [ > 77%] > tests/test_workflows.py::test_rotate_45 PASSED [ > 77%] > tests/test_workflows.py::test_extract_textbench[True-https://arxiv.org/pdf/2201.00214.pdf-pages0] > PASSED [ 77%] > tests/test_workflows.py::test_extract_textbench[True-https://github.com/py-pdf/sample-files/raw/main/009-pdflatex-geotopo/GeoTopo.pdf-pages1] > PASSED [ 77%] > tests/test_workflows.py::test_extract_textbench[True-https://arxiv.org/pdf/2201.00151.pdf-pages2] > PASSED [ 77%] > tests/test_workflows.py::test_extract_textbench[True-https://arxiv.org/pdf/1707.09725.pdf-pages3] > PASSED [ 77%] > tests/test_workflows.py::test_extract_textbench[True-https://arxiv.org/pdf/2201.00021.pdf-pages4] > PASSED [ 78%] > tests/test_workflows.py::test_extract_textbench[True-https://arxiv.org/pdf/2201.00037.pdf-pages5] > PASSED [ 78%] > tests/test_workflows.py::test_extract_textbench[True-https://arxiv.org/pdf/2201.00069.pdf-pages6] > PASSED [ 78%] > tests/test_workflows.py::test_extract_textbench[True-https://arxiv.org/pdf/2201.00178.pdf-pages7] > PASSED [ 78%] > tests/test_workflows.py::test_extract_textbench[True-https://arxiv.org/pdf/2201.00201.pdf-pages8] > PASSED [ 78%] > tests/test_workflows.py::test_extract_textbench[True-https://arxiv.org/pdf/1602.06541.pdf-pages9] > PASSED [ 78%] > tests/test_workflows.py::test_extract_textbench[True-https://arxiv.org/pdf/2201.00200.pdf-pages10] > PASSED [ 79%] > tests/test_workflows.py::test_extract_textbench[True-https://arxiv.org/pdf/2201.00022.pdf-pages11] > PASSED [ 79%] > tests/test_workflows.py::test_extract_textbench[True-https://arxiv.org/pdf/2201.00029.pdf-pages12] > PASSED [ 79%] > tests/test_workflows.py::test_extract_textbench[True-https://github.com/py-pdf/PyPDF2/files/9174594/2017.pdf-pages13] > PASSED [ 79%] > tests/test_workflows.py::test_extract_textbench[True-https://github.com/py-pdf/PyPDF2/files/9175966/2015._pb_decode_pg0.pdf-pages14] > PASSED [ 79%] > tests/test_workflows.py::test_extract_textbench[True-https://arxiv.org/pdf/1601.03642.pdf-pages15] > PASSED [ 79%] > tests/test_workflows.py::test_extract_textbench[True-https://github.com/py-pdf/PyPDF2/files/3796761/17343_2008_Order_09-Jan-2019.pdf-pages16] > PASSED [ 80%] > tests/test_workflows.py::test_extract_textbench[True-https://github.com/py-pdf/PyPDF2/files/8884471/ssi_manwaring.pdf-pages17] > PASSED [ 80%] > tests/test_workflows.py::test_extract_textbench[True-https://github.com/py-pdf/PyPDF2/files/8884469/999092.pdf-pages18] > PASSED [ 80%] > tests/test_workflows.py::test_extract_textbench[True-file:///<<PKGBUILDDIR>>/resources/test > Orient.pdf-pages19] PASSED [ 80%] > tests/test_workflows.py::test_extract_textbench[True-https://github.com/py-pdf/PyPDF2/files/8884470/fdocuments.in_sweet-fundamentals-of-crystallography.pdf-pages20] > PASSED [ 80%] > tests/test_workflows.py::test_extract_textbench[True-https://github.com/py-pdf/PyPDF2/files/8884493/998167.pdf-pages21] > PASSED [ 80%] > tests/test_workflows.py::test_extract_textbench[True-https://corpora.tika.apache.org/base/docs/govdocs1/971/971703.pdf-pages22] > PASSED [ 81%] > tests/test_workflows.py::test_extract_textbench[True-https://corpora.tika.apache.org/base/docs/govdocs1/989/989691.pdf-pages23] > PASSED [ 81%] > tests/test_workflows.py::test_orientations PASSED [ > 81%] > tests/test_workflows.py::test_overlay[resources/crazyones.pdf-sample-files/013-reportlab-overlay/reportlab-overlay.pdf] > PASSED [ 81%] > tests/test_workflows.py::test_overlay[https://corpora.tika.apache.org/base/docs/govdocs1/935/935981.pdf-sample-files/013-reportlab-overlay/reportlab-overlay.pdf] > PASSED [ 81%] > tests/test_workflows.py::test_merge_with_warning[https://corpora.tika.apache.org/base/docs/govdocs1/924/924546.pdf-tika-924546.pdf] > PASSED [ 81%] > tests/test_workflows.py::test_merge[https://corpora.tika.apache.org/base/docs/govdocs1/980/980613.pdf-tika-980613.pdf] > PASSED [ 82%] > tests/test_workflows.py::test_get_metadata[https://corpora.tika.apache.org/base/docs/govdocs1/935/935996.pdf-tika-935996.pdf] > PASSED [ 82%] > tests/test_workflows.py::test_extract_text[https://corpora.tika.apache.org/base/docs/govdocs1/938/938702.pdf-tika-938702.pdf-False-None] > PASSED [ 82%] > tests/test_workflows.py::test_extract_text[https://corpora.tika.apache.org/base/docs/govdocs1/942/942358.pdf-tika-942358.pdf-False-None] > PASSED [ 82%] > tests/test_workflows.py::test_extract_text[https://corpora.tika.apache.org/base/docs/govdocs1/911/911260.pdf-tika-911260.pdf-False-None] > PASSED [ 82%] > tests/test_workflows.py::test_extract_text[https://corpora.tika.apache.org/base/docs/govdocs1/992/992472.pdf-tika-992472.pdf-False-None] > PASSED [ 82%] > tests/test_workflows.py::test_extract_text[https://corpora.tika.apache.org/base/docs/govdocs1/978/978477.pdf-tika-978477.pdf-False-None] > PASSED [ 83%] > tests/test_workflows.py::test_extract_text[https://corpora.tika.apache.org/base/docs/govdocs1/960/960317.pdf-tika-960317.pdf-False-None] > PASSED [ 83%] > tests/test_workflows.py::test_extract_text[https://corpora.tika.apache.org/base/docs/govdocs1/930/930513.pdf-tika-930513.pdf-False-None] > PASSED [ 83%] > tests/test_workflows.py::test_extract_text[https://corpora.tika.apache.org/base/docs/govdocs1/918/918113.pdf-tika-918113.pdf-True-None] > PASSED [ 83%] > tests/test_workflows.py::test_extract_text[https://corpora.tika.apache.org/base/docs/govdocs1/940/940704.pdf-tika-940704.pdf-True-None] > PASSED [ 83%] > tests/test_workflows.py::test_extract_text[https://corpora.tika.apache.org/base/docs/govdocs1/976/976488.pdf-tika-976488.pdf-True-None] > PASSED [ 83%] > tests/test_workflows.py::test_extract_text[https://corpora.tika.apache.org/base/docs/govdocs1/948/948176.pdf-tika-948176.pdf-True-None] > PASSED [ 84%] > tests/test_workflows.py::test_compress_raised[https://corpora.tika.apache.org/base/docs/govdocs1/938/938702.pdf-tika-938702.pdf] > PASSED [ 84%] > tests/test_workflows.py::test_compress_raised[https://corpora.tika.apache.org/base/docs/govdocs1/957/957304.pdf-tika-957304.pdf] > PASSED [ 84%] > tests/test_workflows.py::test_compress[https://corpora.tika.apache.org/base/docs/govdocs1/915/915194.pdf-tika-915194.pdf-False] > PASSED [ 84%] > tests/test_workflows.py::test_compress[https://corpora.tika.apache.org/base/docs/govdocs1/950/950337.pdf-tika-950337.pdf-False] > PASSED [ 84%] > tests/test_workflows.py::test_compress[https://corpora.tika.apache.org/base/docs/govdocs1/962/962292.pdf-tika-962292.pdf-True] > PASSED [ 84%] > tests/test_workflows.py::test_get_fields_warns[https://corpora.tika.apache.org/base/docs/govdocs1/961/961883.pdf-tika-961883.pdf] > PASSED [ 85%] > tests/test_workflows.py::test_get_fields_no_warning[https://corpora.tika.apache.org/base/docs/govdocs1/942/942050.pdf-tika-942050.pdf] > PASSED [ 85%] > tests/test_workflows.py::test_scale_rectangle_indirect_object PASSED [ > 85%] > tests/test_workflows.py::test_merge_output PASSED [ > 85%] > tests/test_workflows.py::test_image_extraction[https://corpora.tika.apache.org/base/docs/govdocs1/994/994636.pdf-tika-994636.pdf] > PASSED [ 85%] > tests/test_workflows.py::test_image_extraction[https://corpora.tika.apache.org/base/docs/govdocs1/952/952133.pdf-tika-952133.pdf] > PASSED [ 85%] > tests/test_workflows.py::test_image_extraction[https://corpora.tika.apache.org/base/docs/govdocs1/914/914568.pdf-tika-914568.pdf] > PASSED [ 86%] > tests/test_workflows.py::test_image_extraction[https://corpora.tika.apache.org/base/docs/govdocs1/952/952016.pdf-tika-952016.pdf] > PASSED [ 86%] > tests/test_workflows.py::test_image_extraction[https://corpora.tika.apache.org/base/docs/govdocs1/965/965118.pdf-tika-952016.pdf] > PASSED [ 86%] > tests/test_workflows.py::test_image_extraction[https://corpora.tika.apache.org/base/docs/govdocs1/959/959184.pdf-tika-959184.pdf] > PASSED [ 86%] > tests/test_workflows.py::test_image_extraction[https://corpora.tika.apache.org/base/docs/govdocs1/958/958496.pdf-tika-958496.pdf] > PASSED [ 86%] > tests/test_workflows.py::test_image_extraction[https://corpora.tika.apache.org/base/docs/govdocs1/972/972174.pdf-tika-972174.pdf] > PASSED [ 86%] > tests/test_workflows.py::test_image_extraction[https://corpora.tika.apache.org/base/docs/govdocs1/972/972243.pdf-tika-972243.pdf] > PASSED [ 87%] > tests/test_workflows.py::test_image_extraction[https://corpora.tika.apache.org/base/docs/govdocs1/969/969502.pdf-tika-969502.pdf] > PASSED [ 87%] > tests/test_workflows.py::test_image_extraction[https://arxiv.org/pdf/2201.00214.pdf-arxiv-2201.00214.pdf] > PASSED [ 87%] > tests/test_workflows.py::test_image_extraction_strict PASSED [ > 87%] > tests/test_workflows.py::test_image_extraction2[https://corpora.tika.apache.org/base/docs/govdocs1/977/977609.pdf-tika-977609.pdf] > PASSED [ 87%] > tests/test_workflows.py::test_get_outline[https://corpora.tika.apache.org/base/docs/govdocs1/918/918137.pdf-tika-918137.pdf] > PASSED [ 88%] > tests/test_workflows.py::test_get_outline[https://unglueit-files.s3.amazonaws.com/ebf/7552c42e9280b4476e59e77acc0bc812.pdf-7552c42e9280b4476e59e77acc0bc812.pdf] > PASSED [ 88%] > tests/test_workflows.py::test_get_xfa[https://corpora.tika.apache.org/base/docs/govdocs1/935/935981.pdf-tika-935981.pdf] > PASSED [ 88%] > tests/test_workflows.py::test_get_xfa[https://corpora.tika.apache.org/base/docs/govdocs1/937/937334.pdf-tika-937334.pdf] > PASSED [ 88%] > tests/test_workflows.py::test_get_fonts[https://corpora.tika.apache.org/base/docs/govdocs1/988/988698.pdf-tika-988698.pdf-False] > PASSED [ 88%] > tests/test_workflows.py::test_get_fonts[https://corpora.tika.apache.org/base/docs/govdocs1/914/914133.pdf-tika-988698.pdf-False] > PASSED [ 88%] > tests/test_workflows.py::test_get_fonts[https://corpora.tika.apache.org/base/docs/govdocs1/912/912552.pdf-tika-912552.pdf-False] > PASSED [ 89%] > tests/test_workflows.py::test_get_fonts[https://corpora.tika.apache.org/base/docs/govdocs1/914/914102.pdf-tika-914102.pdf-True] > PASSED [ 89%] > tests/test_workflows.py::test_get_xmp[https://corpora.tika.apache.org/base/docs/govdocs1/942/942303.pdf-tika-942303.pdf-True] > PASSED [ 89%] > tests/test_workflows.py::test_get_xmp[https://corpora.tika.apache.org/base/docs/govdocs1/935/935981.pdf-tika-935981.pdf-True] > PASSED [ 89%] > tests/test_workflows.py::test_get_xmp[https://corpora.tika.apache.org/base/docs/govdocs1/967/967399.pdf-tika-967399.pdf-True] > PASSED [ 89%] > tests/test_workflows.py::test_get_xmp[https://corpora.tika.apache.org/base/docs/govdocs1/935/935981.pdf-tika-935981.pdf-False] > PASSED [ 89%] > tests/test_workflows.py::test_tounicode_is_identity PASSED [ > 90%] > tests/test_writer.py::test_writer_exception_non_binary PASSED [ > 90%] > tests/test_writer.py::test_writer_clone PASSED [ > 90%] > tests/test_writer.py::test_writer_operations_by_traditional_usage[dont_commit_writer.pdf-True] > PASSED [ 90%] > tests/test_writer.py::test_writer_operations_by_traditional_usage[write_data_here1-True] > PASSED [ 90%] > tests/test_writer.py::test_writer_operations_by_traditional_usage[write_data_here2-False] > PASSED [ 90%] > tests/test_writer.py::test_writer_operations_by_semi_traditional_usage[dont_commit_writer.pdf-True] > PASSED [ 91%] > tests/test_writer.py::test_writer_operations_by_semi_traditional_usage[write_data_here1-True] > PASSED [ 91%] > tests/test_writer.py::test_writer_operations_by_semi_traditional_usage[write_data_here2-False] > PASSED [ 91%] > tests/test_writer.py::test_writer_operations_by_semi_new_traditional_usage[dont_commit_writer.pdf-True] > PASSED [ 91%] > tests/test_writer.py::test_writer_operations_by_semi_new_traditional_usage[write_data_here1-True] > PASSED [ 91%] > tests/test_writer.py::test_writer_operations_by_semi_new_traditional_usage[write_data_here2-False] > PASSED [ 91%] > tests/test_writer.py::test_writer_operation_by_new_usage[dont_commit_writer.pdf-True] > PASSED [ 92%] > tests/test_writer.py::test_writer_operation_by_new_usage[write_data_here1-True] > PASSED [ 92%] > tests/test_writer.py::test_writer_operation_by_new_usage[write_data_here2-False] > PASSED [ 92%] > tests/test_writer.py::test_remove_images[side-by-side-subfig.pdf-False] > PASSED [ 92%] > tests/test_writer.py::test_remove_images[reportlab-inline-image.pdf-True] > PASSED [ 92%] > tests/test_writer.py::test_remove_text[side-by-side-subfig.pdf-False] PASSED > [ 92%] > tests/test_writer.py::test_remove_text[side-by-side-subfig.pdf-True] PASSED [ > 93%] > tests/test_writer.py::test_remove_text[reportlab-inline-image.pdf-False] > PASSED [ 93%] > tests/test_writer.py::test_remove_text[reportlab-inline-image.pdf-True] > PASSED [ 93%] > tests/test_writer.py::test_remove_text_all_operators[False] PASSED [ > 93%] > tests/test_writer.py::test_remove_text_all_operators[True] PASSED [ > 93%] > tests/test_writer.py::test_write_metadata PASSED [ > 93%] > tests/test_writer.py::test_fill_form PASSED [ > 94%] > tests/test_writer.py::test_encrypt[True-userpwd-ownerpwd] PASSED [ > 94%] > tests/test_writer.py::test_encrypt[False-userpwd-ownerpwd] PASSED [ > 94%] > tests/test_writer.py::test_add_outline_item PASSED [ > 94%] > tests/test_writer.py::test_add_named_destination PASSED [ > 94%] > tests/test_writer.py::test_add_uri PASSED [ > 94%] > tests/test_writer.py::test_add_link PASSED [ > 95%] > tests/test_writer.py::test_io_streams PASSED [ > 95%] > tests/test_writer.py::test_regression_issue670 PASSED [ > 95%] > tests/test_writer.py::test_issue301 PASSED [ > 95%] > tests/test_writer.py::test_append_pages_from_reader_append PASSED [ > 95%] > tests/test_writer.py::test_sweep_indirect_references_nullobject_exception > PASSED [ 95%] > tests/test_writer.py::test_write_outline_item_on_page_fitv PASSED [ > 96%] > tests/test_writer.py::test_pdf_header PASSED [ > 96%] > tests/test_writer.py::test_write_dict_stream_object PASSED [ > 96%] > tests/test_writer.py::test_add_single_annotation PASSED [ > 96%] > tests/test_writer.py::test_deprecate_bookmark_decorator PASSED [ > 96%] > tests/test_writer.py::test_colors_in_outline_item PASSED [ > 96%] > tests/test_writer.py::test_write_empty_stream PASSED [ > 97%] > tests/test_writer.py::test_startup_dest PASSED [ > 97%] > tests/test_writer.py::test_threads_empty PASSED [ > 97%] > tests/test_xmp.py::test_read_xmp[src0-True] PASSED [ > 97%] > tests/test_xmp.py::test_read_xmp[src1-False] PASSED [ > 97%] > tests/test_xmp.py::test_regression_issue774 PASSED [ > 97%] > tests/test_xmp.py::test_regression_issue914 PASSED [ > 98%] > tests/test_xmp.py::test_identity[a] PASSED [ > 98%] > tests/test_xmp.py::test_identity[42] PASSED [ > 98%] > tests/test_xmp.py::test_identity[3.141] PASSED [ > 98%] > tests/test_xmp.py::test_identity[False] PASSED [ > 98%] > tests/test_xmp.py::test_identity[True] PASSED [ > 98%] > tests/test_xmp.py::test_xmpmm[https://corpora.tika.apache.org/base/docs/govdocs1/955/955562.pdf-tika-955562.pdf-uuid:ca96e032-c2af-49bd-a71c-95889bafbf1d] > PASSED [ 99%] > tests/test_xmp.py::test_dc_description PASSED [ > 99%] > tests/test_xmp.py::test_dc_creator PASSED [ > 99%] > tests/test_xmp.py::test_custom_properties PASSED [ > 99%] > tests/test_xmp.py::test_dc_subject PASSED [ > 99%] > tests/test_xmp.py::test_issue585 PASSED > [100%] > > =================================== FAILURES > =================================== > ___________________ test_get_images_raw[True-True--1-True-] > ____________________ > > caplog = <_pytest.logging.LogCaptureFixture object at 0x7fe2dd02f090> > strict = True, with_prev_0 = True, startx_correction = -1, should_fail = True > warning_msgs = '' > > @pytest.mark.parametrize( > ("strict", "with_prev_0", "startx_correction", "should_fail", > "warning_msgs"), > [ > ( > True, > False, > -1, > False, > [ > "startxref on same line as offset", > "Xref table not zero-indexed. " > "ID numbers for objects will be corrected.", > ], > ), # all nominal => no fail > (True, True, -1, True, ""), # Prev=0 => fail expected > ( > False, > False, > -1, > False, > ["startxref on same line as offset"], > ), > ( > False, > True, > -1, > False, > [ > "startxref on same line as offset", > "/Prev=0 in the trailer - assuming there is no previous > xref table", > ], > ), # Prev =0 => no strict so tolerant > (True, False, 0, True, ""), # error on startxref, in strict => > fail expected > (True, True, 0, True, ""), > ( > False, > False, > 0, > False, > ["startxref on same line as offset", "incorrect startxref > pointer(1)"], > ), # error on startxref, but no strict => xref rebuilt,no fail > ( > False, > True, > 0, > False, > ["startxref on same line as offset", "incorrect startxref > pointer(1)"], > ), > ], > ) > def test_get_images_raw( > caplog, strict, with_prev_0, startx_correction, should_fail, > warning_msgs > ): > pdf_data = ( > b"%%PDF-1.7\n" > b"1 0 obj << /Count 1 /Kids [4 0 R] /Type /Pages >> endobj\n" > b"2 0 obj << >> endobj\n" > b"3 0 obj << >> endobj\n" > b"4 0 obj << /Contents 3 0 R /CropBox [0.0 0.0 2550.0 3508.0]" > b" /MediaBox [0.0 0.0 2550.0 3508.0] /Parent 1 0 R" > b" /Resources << /Font << >> >>" > b" /Rotate 0 /Type /Page >> endobj\n" > b"5 0 obj << /Pages 1 0 R /Type /Catalog >> endobj\n" > b"xref 1 5\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"trailer << %s/Root 5 0 R /Size 6 >>\n" > b"startxref %d\n" > b"%%%%EOF" > ) > pdf_data = pdf_data % ( > pdf_data.find(b"1 0 obj"), > pdf_data.find(b"2 0 obj"), > pdf_data.find(b"3 0 obj"), > pdf_data.find(b"4 0 obj"), > pdf_data.find(b"5 0 obj"), > b"/Prev 0 " if with_prev_0 else b"", > # startx_correction should be -1 due to double % at the beginning > # inducing an error on startxref computation > pdf_data.find(b"xref") + startx_correction, > ) > pdf_stream = io.BytesIO(pdf_data) > if should_fail: > with pytest.raises(PdfReadError) as exc, > pytest.warns(PdfReadWarning): > > PdfReader(pdf_stream, strict=strict) > > tests/test_reader.py:316: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > PyPDF2/_reader.py:317: in __init__ > self.read(stream) > PyPDF2/_reader.py:1420: in read > self._read_xref_tables_and_trailers(stream, startxref, xref_issue_nr) > PyPDF2/_reader.py:1641: in _read_xref_tables_and_trailers > startxref = self._read_xref_other_error(stream, startxref) > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > self = <PyPDF2._reader.PdfReader object at 0x7fe2dd02f5d0> > stream = <_io.BytesIO object at 0x7fe2de01f510>, startxref = 0 > > def _read_xref_other_error( > self, stream: StreamType, startxref: int > ) -> Optional[int]: > # some PDFs have /Prev=0 in the trailer, instead of no /Prev > if startxref == 0: > if self.strict: > > raise PdfReadError( > "/Prev=0 in the trailer (try opening with strict=False)" > ) > E PyPDF2.errors.PdfReadError: /Prev=0 in the trailer (try > opening with strict=False) > > PyPDF2/_reader.py:1674: PdfReadError > > During handling of the above exception, another exception occurred: > > caplog = <_pytest.logging.LogCaptureFixture object at 0x7fe2dd02f090> > strict = True, with_prev_0 = True, startx_correction = -1, should_fail = True > warning_msgs = '' > > @pytest.mark.parametrize( > ("strict", "with_prev_0", "startx_correction", "should_fail", > "warning_msgs"), > [ > ( > True, > False, > -1, > False, > [ > "startxref on same line as offset", > "Xref table not zero-indexed. " > "ID numbers for objects will be corrected.", > ], > ), # all nominal => no fail > (True, True, -1, True, ""), # Prev=0 => fail expected > ( > False, > False, > -1, > False, > ["startxref on same line as offset"], > ), > ( > False, > True, > -1, > False, > [ > "startxref on same line as offset", > "/Prev=0 in the trailer - assuming there is no previous > xref table", > ], > ), # Prev =0 => no strict so tolerant > (True, False, 0, True, ""), # error on startxref, in strict => > fail expected > (True, True, 0, True, ""), > ( > False, > False, > 0, > False, > ["startxref on same line as offset", "incorrect startxref > pointer(1)"], > ), # error on startxref, but no strict => xref rebuilt,no fail > ( > False, > True, > 0, > False, > ["startxref on same line as offset", "incorrect startxref > pointer(1)"], > ), > ], > ) > def test_get_images_raw( > caplog, strict, with_prev_0, startx_correction, should_fail, > warning_msgs > ): > pdf_data = ( > b"%%PDF-1.7\n" > b"1 0 obj << /Count 1 /Kids [4 0 R] /Type /Pages >> endobj\n" > b"2 0 obj << >> endobj\n" > b"3 0 obj << >> endobj\n" > b"4 0 obj << /Contents 3 0 R /CropBox [0.0 0.0 2550.0 3508.0]" > b" /MediaBox [0.0 0.0 2550.0 3508.0] /Parent 1 0 R" > b" /Resources << /Font << >> >>" > b" /Rotate 0 /Type /Page >> endobj\n" > b"5 0 obj << /Pages 1 0 R /Type /Catalog >> endobj\n" > b"xref 1 5\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"trailer << %s/Root 5 0 R /Size 6 >>\n" > b"startxref %d\n" > b"%%%%EOF" > ) > pdf_data = pdf_data % ( > pdf_data.find(b"1 0 obj"), > pdf_data.find(b"2 0 obj"), > pdf_data.find(b"3 0 obj"), > pdf_data.find(b"4 0 obj"), > pdf_data.find(b"5 0 obj"), > b"/Prev 0 " if with_prev_0 else b"", > # startx_correction should be -1 due to double % at the beginning > # inducing an error on startxref computation > pdf_data.find(b"xref") + startx_correction, > ) > pdf_stream = io.BytesIO(pdf_data) > if should_fail: > > with pytest.raises(PdfReadError) as exc, > > pytest.warns(PdfReadWarning): > E Failed: DID NOT WARN. No warnings of type (<class > 'PyPDF2.errors.PdfReadWarning'>,) were emitted. > E Emitted warnings: []. > > tests/test_reader.py:315: Failed > ------------------------------ Captured log call > ------------------------------- > WARNING PyPDF2._reader:_utils.py:375 startxref on same line as offset > WARNING PyPDF2._reader:_utils.py:375 Xref table not zero-indexed. ID numbers > for objects will be corrected. > ___________________ test_get_images_raw[True-False-0-True-] > ____________________ > > caplog = <_pytest.logging.LogCaptureFixture object at 0x7fe2dd020a10> > strict = True, with_prev_0 = False, startx_correction = 0, should_fail = True > warning_msgs = '' > > @pytest.mark.parametrize( > ("strict", "with_prev_0", "startx_correction", "should_fail", > "warning_msgs"), > [ > ( > True, > False, > -1, > False, > [ > "startxref on same line as offset", > "Xref table not zero-indexed. " > "ID numbers for objects will be corrected.", > ], > ), # all nominal => no fail > (True, True, -1, True, ""), # Prev=0 => fail expected > ( > False, > False, > -1, > False, > ["startxref on same line as offset"], > ), > ( > False, > True, > -1, > False, > [ > "startxref on same line as offset", > "/Prev=0 in the trailer - assuming there is no previous > xref table", > ], > ), # Prev =0 => no strict so tolerant > (True, False, 0, True, ""), # error on startxref, in strict => > fail expected > (True, True, 0, True, ""), > ( > False, > False, > 0, > False, > ["startxref on same line as offset", "incorrect startxref > pointer(1)"], > ), # error on startxref, but no strict => xref rebuilt,no fail > ( > False, > True, > 0, > False, > ["startxref on same line as offset", "incorrect startxref > pointer(1)"], > ), > ], > ) > def test_get_images_raw( > caplog, strict, with_prev_0, startx_correction, should_fail, > warning_msgs > ): > pdf_data = ( > b"%%PDF-1.7\n" > b"1 0 obj << /Count 1 /Kids [4 0 R] /Type /Pages >> endobj\n" > b"2 0 obj << >> endobj\n" > b"3 0 obj << >> endobj\n" > b"4 0 obj << /Contents 3 0 R /CropBox [0.0 0.0 2550.0 3508.0]" > b" /MediaBox [0.0 0.0 2550.0 3508.0] /Parent 1 0 R" > b" /Resources << /Font << >> >>" > b" /Rotate 0 /Type /Page >> endobj\n" > b"5 0 obj << /Pages 1 0 R /Type /Catalog >> endobj\n" > b"xref 1 5\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"trailer << %s/Root 5 0 R /Size 6 >>\n" > b"startxref %d\n" > b"%%%%EOF" > ) > pdf_data = pdf_data % ( > pdf_data.find(b"1 0 obj"), > pdf_data.find(b"2 0 obj"), > pdf_data.find(b"3 0 obj"), > pdf_data.find(b"4 0 obj"), > pdf_data.find(b"5 0 obj"), > b"/Prev 0 " if with_prev_0 else b"", > # startx_correction should be -1 due to double % at the beginning > # inducing an error on startxref computation > pdf_data.find(b"xref") + startx_correction, > ) > pdf_stream = io.BytesIO(pdf_data) > if should_fail: > with pytest.raises(PdfReadError) as exc, > pytest.warns(PdfReadWarning): > > PdfReader(pdf_stream, strict=strict) > > tests/test_reader.py:316: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > PyPDF2/_reader.py:317: in __init__ > self.read(stream) > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > self = <PyPDF2._reader.PdfReader object at 0x7fe2dd020fd0> > stream = <_io.BytesIO object at 0x7fe2de873970> > > def read(self, stream: StreamType) -> None: > self._basic_validation(stream) > self._find_eof_marker(stream) > startxref = self._find_startxref_pos(stream) > > # check and eventually correct the startxref only in not strict > xref_issue_nr = self._get_xref_issues(stream, startxref) > if xref_issue_nr != 0: > if self.strict and xref_issue_nr: > > raise PdfReadError("Broken xref table") > E PyPDF2.errors.PdfReadError: Broken xref table > > PyPDF2/_reader.py:1416: PdfReadError > > During handling of the above exception, another exception occurred: > > caplog = <_pytest.logging.LogCaptureFixture object at 0x7fe2dd020a10> > strict = True, with_prev_0 = False, startx_correction = 0, should_fail = True > warning_msgs = '' > > @pytest.mark.parametrize( > ("strict", "with_prev_0", "startx_correction", "should_fail", > "warning_msgs"), > [ > ( > True, > False, > -1, > False, > [ > "startxref on same line as offset", > "Xref table not zero-indexed. " > "ID numbers for objects will be corrected.", > ], > ), # all nominal => no fail > (True, True, -1, True, ""), # Prev=0 => fail expected > ( > False, > False, > -1, > False, > ["startxref on same line as offset"], > ), > ( > False, > True, > -1, > False, > [ > "startxref on same line as offset", > "/Prev=0 in the trailer - assuming there is no previous > xref table", > ], > ), # Prev =0 => no strict so tolerant > (True, False, 0, True, ""), # error on startxref, in strict => > fail expected > (True, True, 0, True, ""), > ( > False, > False, > 0, > False, > ["startxref on same line as offset", "incorrect startxref > pointer(1)"], > ), # error on startxref, but no strict => xref rebuilt,no fail > ( > False, > True, > 0, > False, > ["startxref on same line as offset", "incorrect startxref > pointer(1)"], > ), > ], > ) > def test_get_images_raw( > caplog, strict, with_prev_0, startx_correction, should_fail, > warning_msgs > ): > pdf_data = ( > b"%%PDF-1.7\n" > b"1 0 obj << /Count 1 /Kids [4 0 R] /Type /Pages >> endobj\n" > b"2 0 obj << >> endobj\n" > b"3 0 obj << >> endobj\n" > b"4 0 obj << /Contents 3 0 R /CropBox [0.0 0.0 2550.0 3508.0]" > b" /MediaBox [0.0 0.0 2550.0 3508.0] /Parent 1 0 R" > b" /Resources << /Font << >> >>" > b" /Rotate 0 /Type /Page >> endobj\n" > b"5 0 obj << /Pages 1 0 R /Type /Catalog >> endobj\n" > b"xref 1 5\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"trailer << %s/Root 5 0 R /Size 6 >>\n" > b"startxref %d\n" > b"%%%%EOF" > ) > pdf_data = pdf_data % ( > pdf_data.find(b"1 0 obj"), > pdf_data.find(b"2 0 obj"), > pdf_data.find(b"3 0 obj"), > pdf_data.find(b"4 0 obj"), > pdf_data.find(b"5 0 obj"), > b"/Prev 0 " if with_prev_0 else b"", > # startx_correction should be -1 due to double % at the beginning > # inducing an error on startxref computation > pdf_data.find(b"xref") + startx_correction, > ) > pdf_stream = io.BytesIO(pdf_data) > if should_fail: > > with pytest.raises(PdfReadError) as exc, > > pytest.warns(PdfReadWarning): > E Failed: DID NOT WARN. No warnings of type (<class > 'PyPDF2.errors.PdfReadWarning'>,) were emitted. > E Emitted warnings: []. > > tests/test_reader.py:315: Failed > ------------------------------ Captured log call > ------------------------------- > WARNING PyPDF2._reader:_utils.py:375 startxref on same line as offset > ____________________ test_get_images_raw[True-True-0-True-] > ____________________ > > caplog = <_pytest.logging.LogCaptureFixture object at 0x7fe2de0a0850> > strict = True, with_prev_0 = True, startx_correction = 0, should_fail = True > warning_msgs = '' > > @pytest.mark.parametrize( > ("strict", "with_prev_0", "startx_correction", "should_fail", > "warning_msgs"), > [ > ( > True, > False, > -1, > False, > [ > "startxref on same line as offset", > "Xref table not zero-indexed. " > "ID numbers for objects will be corrected.", > ], > ), # all nominal => no fail > (True, True, -1, True, ""), # Prev=0 => fail expected > ( > False, > False, > -1, > False, > ["startxref on same line as offset"], > ), > ( > False, > True, > -1, > False, > [ > "startxref on same line as offset", > "/Prev=0 in the trailer - assuming there is no previous > xref table", > ], > ), # Prev =0 => no strict so tolerant > (True, False, 0, True, ""), # error on startxref, in strict => > fail expected > (True, True, 0, True, ""), > ( > False, > False, > 0, > False, > ["startxref on same line as offset", "incorrect startxref > pointer(1)"], > ), # error on startxref, but no strict => xref rebuilt,no fail > ( > False, > True, > 0, > False, > ["startxref on same line as offset", "incorrect startxref > pointer(1)"], > ), > ], > ) > def test_get_images_raw( > caplog, strict, with_prev_0, startx_correction, should_fail, > warning_msgs > ): > pdf_data = ( > b"%%PDF-1.7\n" > b"1 0 obj << /Count 1 /Kids [4 0 R] /Type /Pages >> endobj\n" > b"2 0 obj << >> endobj\n" > b"3 0 obj << >> endobj\n" > b"4 0 obj << /Contents 3 0 R /CropBox [0.0 0.0 2550.0 3508.0]" > b" /MediaBox [0.0 0.0 2550.0 3508.0] /Parent 1 0 R" > b" /Resources << /Font << >> >>" > b" /Rotate 0 /Type /Page >> endobj\n" > b"5 0 obj << /Pages 1 0 R /Type /Catalog >> endobj\n" > b"xref 1 5\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"trailer << %s/Root 5 0 R /Size 6 >>\n" > b"startxref %d\n" > b"%%%%EOF" > ) > pdf_data = pdf_data % ( > pdf_data.find(b"1 0 obj"), > pdf_data.find(b"2 0 obj"), > pdf_data.find(b"3 0 obj"), > pdf_data.find(b"4 0 obj"), > pdf_data.find(b"5 0 obj"), > b"/Prev 0 " if with_prev_0 else b"", > # startx_correction should be -1 due to double % at the beginning > # inducing an error on startxref computation > pdf_data.find(b"xref") + startx_correction, > ) > pdf_stream = io.BytesIO(pdf_data) > if should_fail: > with pytest.raises(PdfReadError) as exc, > pytest.warns(PdfReadWarning): > > PdfReader(pdf_stream, strict=strict) > > tests/test_reader.py:316: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > PyPDF2/_reader.py:317: in __init__ > self.read(stream) > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > self = <PyPDF2._reader.PdfReader object at 0x7fe2de0a0210> > stream = <_io.BytesIO object at 0x7fe2dd30b060> > > def read(self, stream: StreamType) -> None: > self._basic_validation(stream) > self._find_eof_marker(stream) > startxref = self._find_startxref_pos(stream) > > # check and eventually correct the startxref only in not strict > xref_issue_nr = self._get_xref_issues(stream, startxref) > if xref_issue_nr != 0: > if self.strict and xref_issue_nr: > > raise PdfReadError("Broken xref table") > E PyPDF2.errors.PdfReadError: Broken xref table > > PyPDF2/_reader.py:1416: PdfReadError > > During handling of the above exception, another exception occurred: > > caplog = <_pytest.logging.LogCaptureFixture object at 0x7fe2de0a0850> > strict = True, with_prev_0 = True, startx_correction = 0, should_fail = True > warning_msgs = '' > > @pytest.mark.parametrize( > ("strict", "with_prev_0", "startx_correction", "should_fail", > "warning_msgs"), > [ > ( > True, > False, > -1, > False, > [ > "startxref on same line as offset", > "Xref table not zero-indexed. " > "ID numbers for objects will be corrected.", > ], > ), # all nominal => no fail > (True, True, -1, True, ""), # Prev=0 => fail expected > ( > False, > False, > -1, > False, > ["startxref on same line as offset"], > ), > ( > False, > True, > -1, > False, > [ > "startxref on same line as offset", > "/Prev=0 in the trailer - assuming there is no previous > xref table", > ], > ), # Prev =0 => no strict so tolerant > (True, False, 0, True, ""), # error on startxref, in strict => > fail expected > (True, True, 0, True, ""), > ( > False, > False, > 0, > False, > ["startxref on same line as offset", "incorrect startxref > pointer(1)"], > ), # error on startxref, but no strict => xref rebuilt,no fail > ( > False, > True, > 0, > False, > ["startxref on same line as offset", "incorrect startxref > pointer(1)"], > ), > ], > ) > def test_get_images_raw( > caplog, strict, with_prev_0, startx_correction, should_fail, > warning_msgs > ): > pdf_data = ( > b"%%PDF-1.7\n" > b"1 0 obj << /Count 1 /Kids [4 0 R] /Type /Pages >> endobj\n" > b"2 0 obj << >> endobj\n" > b"3 0 obj << >> endobj\n" > b"4 0 obj << /Contents 3 0 R /CropBox [0.0 0.0 2550.0 3508.0]" > b" /MediaBox [0.0 0.0 2550.0 3508.0] /Parent 1 0 R" > b" /Resources << /Font << >> >>" > b" /Rotate 0 /Type /Page >> endobj\n" > b"5 0 obj << /Pages 1 0 R /Type /Catalog >> endobj\n" > b"xref 1 5\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"trailer << %s/Root 5 0 R /Size 6 >>\n" > b"startxref %d\n" > b"%%%%EOF" > ) > pdf_data = pdf_data % ( > pdf_data.find(b"1 0 obj"), > pdf_data.find(b"2 0 obj"), > pdf_data.find(b"3 0 obj"), > pdf_data.find(b"4 0 obj"), > pdf_data.find(b"5 0 obj"), > b"/Prev 0 " if with_prev_0 else b"", > # startx_correction should be -1 due to double % at the beginning > # inducing an error on startxref computation > pdf_data.find(b"xref") + startx_correction, > ) > pdf_stream = io.BytesIO(pdf_data) > if should_fail: > > with pytest.raises(PdfReadError) as exc, > > pytest.warns(PdfReadWarning): > E Failed: DID NOT WARN. No warnings of type (<class > 'PyPDF2.errors.PdfReadWarning'>,) were emitted. > E Emitted warnings: []. > > tests/test_reader.py:315: Failed > ------------------------------ Captured log call > ------------------------------- > WARNING PyPDF2._reader:_utils.py:375 startxref on same line as offset > ___________________________ test_read_prev_0_trailer > ___________________________ > > def test_read_prev_0_trailer(): > pdf_data = ( > b"%%PDF-1.7\n" > b"1 0 obj << /Count 1 /Kids [4 0 R] /Type /Pages >> endobj\n" > b"2 0 obj << >> endobj\n" > b"3 0 obj << >> endobj\n" > b"4 0 obj << /Contents 3 0 R /CropBox [0.0 0.0 2550.0 3508.0]" > b" /MediaBox [0.0 0.0 2550.0 3508.0] /Parent 1 0 R" > b" /Resources << /Font << >> >>" > b" /Rotate 0 /Type /Page >> endobj\n" > b"5 0 obj << /Pages 1 0 R /Type /Catalog >> endobj\n" > b"xref 1 5\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"trailer << %s/Root 5 0 R /Size 6 >>\n" > b"startxref %d\n" > b"%%%%EOF" > ) > with_prev_0 = True > pdf_data = pdf_data % ( > pdf_data.find(b"1 0 obj"), > pdf_data.find(b"2 0 obj"), > pdf_data.find(b"3 0 obj"), > pdf_data.find(b"4 0 obj"), > pdf_data.find(b"5 0 obj"), > b"/Prev 0 " if with_prev_0 else b"", > pdf_data.find(b"xref") - 1, > ) > pdf_stream = io.BytesIO(pdf_data) > with pytest.raises(PdfReadError) as exc, pytest.warns(PdfReadWarning): > > PdfReader(pdf_stream, strict=True) > > tests/test_reader.py:508: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > PyPDF2/_reader.py:317: in __init__ > self.read(stream) > PyPDF2/_reader.py:1420: in read > self._read_xref_tables_and_trailers(stream, startxref, xref_issue_nr) > PyPDF2/_reader.py:1641: in _read_xref_tables_and_trailers > startxref = self._read_xref_other_error(stream, startxref) > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > self = <PyPDF2._reader.PdfReader object at 0x7fe2dcf80b90> > stream = <_io.BytesIO object at 0x7fe2de08a160>, startxref = 0 > > def _read_xref_other_error( > self, stream: StreamType, startxref: int > ) -> Optional[int]: > # some PDFs have /Prev=0 in the trailer, instead of no /Prev > if startxref == 0: > if self.strict: > > raise PdfReadError( > "/Prev=0 in the trailer (try opening with strict=False)" > ) > E PyPDF2.errors.PdfReadError: /Prev=0 in the trailer (try > opening with strict=False) > > PyPDF2/_reader.py:1674: PdfReadError > > During handling of the above exception, another exception occurred: > > def test_read_prev_0_trailer(): > pdf_data = ( > b"%%PDF-1.7\n" > b"1 0 obj << /Count 1 /Kids [4 0 R] /Type /Pages >> endobj\n" > b"2 0 obj << >> endobj\n" > b"3 0 obj << >> endobj\n" > b"4 0 obj << /Contents 3 0 R /CropBox [0.0 0.0 2550.0 3508.0]" > b" /MediaBox [0.0 0.0 2550.0 3508.0] /Parent 1 0 R" > b" /Resources << /Font << >> >>" > b" /Rotate 0 /Type /Page >> endobj\n" > b"5 0 obj << /Pages 1 0 R /Type /Catalog >> endobj\n" > b"xref 1 5\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"trailer << %s/Root 5 0 R /Size 6 >>\n" > b"startxref %d\n" > b"%%%%EOF" > ) > with_prev_0 = True > pdf_data = pdf_data % ( > pdf_data.find(b"1 0 obj"), > pdf_data.find(b"2 0 obj"), > pdf_data.find(b"3 0 obj"), > pdf_data.find(b"4 0 obj"), > pdf_data.find(b"5 0 obj"), > b"/Prev 0 " if with_prev_0 else b"", > pdf_data.find(b"xref") - 1, > ) > pdf_stream = io.BytesIO(pdf_data) > > with pytest.raises(PdfReadError) as exc, pytest.warns(PdfReadWarning): > E Failed: DID NOT WARN. No warnings of type (<class > 'PyPDF2.errors.PdfReadWarning'>,) were emitted. > E Emitted warnings: []. > > tests/test_reader.py:507: Failed > ------------------------------ Captured log call > ------------------------------- > WARNING PyPDF2._reader:_utils.py:375 startxref on same line as offset > WARNING PyPDF2._reader:_utils.py:375 Xref table not zero-indexed. ID numbers > for objects will be corrected. > _________________________ test_read_unknown_zero_pages > _________________________ > > caplog = <_pytest.logging.LogCaptureFixture object at 0x7fe2de75b590> > > def test_read_unknown_zero_pages(caplog): > pdf_data = ( > b"%%PDF-1.7\n" > b"1 0 obj << /Count 1 /Kids [4 0 R] /Type /Pages >> endobj\n" > b"2 0 obj << >> endobj\n" > b"3 0 obj << >> endobj\n" > b"4 0 obj << /Contents 3 0 R /CropBox [0.0 0.0 2550.0 3508.0]" > b" /MediaBox [0.0 0.0 2550.0 3508.0] /Parent 1 0 R" > b" /Resources << /Font << >> >>" > b" /Rotate 0 /Type /Page >> endobj\n" > # Pages 0 0 is the key point: > b"5 0 obj << /Pages 0 0 R /Type /Catalog >> endobj\n" > b"xref 1 5\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"trailer << /Root 5 1 R /Size 6 >>\n" > b"startxref %d\n" > b"%%%%EOF" > ) > pdf_data = pdf_data % ( > pdf_data.find(b"1 0 obj"), > pdf_data.find(b"2 0 obj"), > pdf_data.find(b"3 0 obj"), > pdf_data.find(b"4 0 obj"), > pdf_data.find(b"5 0 obj"), > pdf_data.find(b"xref") - 1, > ) > pdf_stream = io.BytesIO(pdf_data) > reader = PdfReader(pdf_stream, strict=True) > warnings = [ > "startxref on same line as offset", > "Xref table not zero-indexed. ID numbers for objects will be > corrected.", > ] > assert normalize_warnings(caplog.text) == warnings > with pytest.raises(PdfReadError) as exc, pytest.warns(PdfReadWarning): > > len(reader.pages) > > tests/test_reader.py:585: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > PyPDF2/_page.py:2047: in __len__ > return self.length_function() > PyPDF2/_reader.py:446: in _get_num_pages > self._flatten() > PyPDF2/_reader.py:1097: in _flatten > catalog = self.trailer[TK.ROOT].get_object() > PyPDF2/generic/_data_structures.py:150: in __getitem__ > return dict.__getitem__(self, key).get_object() > PyPDF2/generic/_base.py:164: in get_object > obj = self.pdf.get_object(self) > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > self = <PyPDF2._reader.PdfReader object at 0x7fe2de75b910> > indirect_reference = IndirectObject(5, 1, 140612371593488) > > def get_object( > self, indirect_reference: Union[int, IndirectObject] > ) -> Optional[PdfObject]: > if isinstance(indirect_reference, int): > indirect_reference = IndirectObject(indirect_reference, 0, self) > retval = self.cache_get_indirect_object( > indirect_reference.generation, indirect_reference.idnum > ) > if retval is not None: > return retval > if ( > indirect_reference.generation == 0 > and indirect_reference.idnum in self.xref_objStm > ): > retval = self._get_object_from_stream(indirect_reference) # > type: ignore > elif ( > indirect_reference.generation in self.xref > and indirect_reference.idnum in > self.xref[indirect_reference.generation] > ): > if self.xref_free_entry.get(indirect_reference.generation, > {}).get( > indirect_reference.idnum, False > ): > return NullObject() > start = > self.xref[indirect_reference.generation][indirect_reference.idnum] > self.stream.seek(start, 0) > try: > idnum, generation = self.read_object_header(self.stream) > except Exception: > if hasattr(self.stream, "getbuffer"): > buf = bytes(self.stream.getbuffer()) # type: ignore > else: > p = self.stream.tell() > self.stream.seek(0, 0) > buf = self.stream.read(-1) > self.stream.seek(p, 0) > m = re.search( > > rf"\s{indirect_reference.idnum}\s+{indirect_reference.generation}\s+obj".encode(), > buf, > ) > if m is not None: > logger_warning( > f"Object ID > {indirect_reference.idnum},{indirect_reference.generation} ref repaired", > __name__, > ) > self.xref[indirect_reference.generation][ > indirect_reference.idnum > ] = (m.start(0) + 1) > self.stream.seek(m.start(0) + 1) > idnum, generation = self.read_object_header(self.stream) > else: > idnum = -1 # exception will be raised below > if idnum != indirect_reference.idnum and self.xref_index: > # Xref table probably had bad indexes due to not being > zero-indexed > if self.strict: > raise PdfReadError( > f"Expected object ID ({indirect_reference.idnum} > {indirect_reference.generation}) " > f"does not match actual ({idnum} {generation}); " > "xref table not zero-indexed." > ) > # xref table is corrected in non-strict mode > elif idnum != indirect_reference.idnum and self.strict: > # some other problem > raise PdfReadError( > f"Expected object ID ({indirect_reference.idnum} " > f"{indirect_reference.generation}) does not match actual " > f"({idnum} {generation})." > ) > if self.strict: > assert generation == indirect_reference.generation > retval = read_object(self.stream, self) # type: ignore > > # override encryption is used for the /Encrypt dictionary > if not self._override_encryption and self._encryption is not None: > # if we don't have the encryption key: > if not self._encryption.is_decrypted(): > raise FileNotDecryptedError("File has not been decrypted") > # otherwise, decrypt here... > retval = cast(PdfObject, retval) > retval = self._encryption.decrypt_object( > retval, indirect_reference.idnum, > indirect_reference.generation > ) > else: > if hasattr(self.stream, "getbuffer"): > buf = bytes(self.stream.getbuffer()) # type: ignore > else: > p = self.stream.tell() > self.stream.seek(0, 0) > buf = self.stream.read(-1) > self.stream.seek(p, 0) > m = re.search( > > rf"\s{indirect_reference.idnum}\s+{indirect_reference.generation}\s+obj".encode(), > buf, > ) > if m is not None: > logger_warning( > f"Object {indirect_reference.idnum} > {indirect_reference.generation} found", > __name__, > ) > if indirect_reference.generation not in self.xref: > self.xref[indirect_reference.generation] = {} > > self.xref[indirect_reference.generation][indirect_reference.idnum] = ( > m.start(0) + 1 > ) > self.stream.seek(m.end(0) + 1) > skip_over_whitespace(self.stream) > self.stream.seek(-1, 1) > retval = read_object(self.stream, self) # type: ignore > > # override encryption is used for the /Encrypt dictionary > if not self._override_encryption and self._encryption is not > None: > # if we don't have the encryption key: > if not self._encryption.is_decrypted(): > raise FileNotDecryptedError("File has not been > decrypted") > # otherwise, decrypt here... > retval = cast(PdfObject, retval) > retval = self._encryption.decrypt_object( > retval, indirect_reference.idnum, > indirect_reference.generation > ) > else: > logger_warning( > f"Object {indirect_reference.idnum} > {indirect_reference.generation} not defined.", > __name__, > ) > if self.strict: > > raise PdfReadError("Could not find object.") > E PyPDF2.errors.PdfReadError: Could not find object. > > PyPDF2/_reader.py:1311: PdfReadError > > During handling of the above exception, another exception occurred: > > caplog = <_pytest.logging.LogCaptureFixture object at 0x7fe2de75b590> > > def test_read_unknown_zero_pages(caplog): > pdf_data = ( > b"%%PDF-1.7\n" > b"1 0 obj << /Count 1 /Kids [4 0 R] /Type /Pages >> endobj\n" > b"2 0 obj << >> endobj\n" > b"3 0 obj << >> endobj\n" > b"4 0 obj << /Contents 3 0 R /CropBox [0.0 0.0 2550.0 3508.0]" > b" /MediaBox [0.0 0.0 2550.0 3508.0] /Parent 1 0 R" > b" /Resources << /Font << >> >>" > b" /Rotate 0 /Type /Page >> endobj\n" > # Pages 0 0 is the key point: > b"5 0 obj << /Pages 0 0 R /Type /Catalog >> endobj\n" > b"xref 1 5\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"%010d 00000 n\n" > b"trailer << /Root 5 1 R /Size 6 >>\n" > b"startxref %d\n" > b"%%%%EOF" > ) > pdf_data = pdf_data % ( > pdf_data.find(b"1 0 obj"), > pdf_data.find(b"2 0 obj"), > pdf_data.find(b"3 0 obj"), > pdf_data.find(b"4 0 obj"), > pdf_data.find(b"5 0 obj"), > pdf_data.find(b"xref") - 1, > ) > pdf_stream = io.BytesIO(pdf_data) > reader = PdfReader(pdf_stream, strict=True) > warnings = [ > "startxref on same line as offset", > "Xref table not zero-indexed. ID numbers for objects will be > corrected.", > ] > assert normalize_warnings(caplog.text) == warnings > > with pytest.raises(PdfReadError) as exc, pytest.warns(PdfReadWarning): > E Failed: DID NOT WARN. No warnings of type (<class > 'PyPDF2.errors.PdfReadWarning'>,) were emitted. > E Emitted warnings: []. > > tests/test_reader.py:584: Failed > ------------------------------ Captured log call > ------------------------------- > WARNING PyPDF2._reader:_utils.py:375 startxref on same line as offset > WARNING PyPDF2._reader:_utils.py:375 Xref table not zero-indexed. ID numbers > for objects will be corrected. > WARNING PyPDF2._reader:_utils.py:375 Object 5 1 not defined. > _____________________________ test_issue604[True] > ______________________________ > > caplog = <_pytest.logging.LogCaptureFixture object at 0x7fe2dd231a10> > strict = True > > @pytest.mark.parametrize( > "strict", > [True, False], > ) > def test_issue604(caplog, strict): > """Test with invalid destinations""" # todo > with open(RESOURCE_ROOT / "issue-604.pdf", "rb") as f: > pdf = None > outline = None > if strict: > pdf = PdfReader(f, strict=strict) > with pytest.raises(PdfReadError) as exc, > pytest.warns(PdfReadWarning): > > outline = pdf.outline > > tests/test_reader.py:664: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > PyPDF2/_reader.py:739: in outline > return self._get_outline() > PyPDF2/_reader.py:775: in _get_outline > outline_obj = self._build_outline_item(node) > PyPDF2/_reader.py:939: in _build_outline_item > outline_item = self._build_destination(title, dest) > PyPDF2/_reader.py:901: in _build_destination > return Destination(title, page, typ, *array) # type: ignore > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > self = {'/Title': 'ms_Thyroid_2_2020_071520_watermarked.pdf', '/Page': > NullObject, '/Type': 0} > title = 'ms_Thyroid_2_2020_071520_watermarked.pdf', page = NullObject, typ = 0 > args = (0, 1) > > def __init__( > self, > title: str, > page: Union[NumberObject, IndirectObject, NullObject, > DictionaryObject], > typ: Union[str, NumberObject], > *args: Any, # ZoomArgType > ) -> None: > DictionaryObject.__init__(self) > self[NameObject("/Title")] = TextStringObject(title) > self[NameObject("/Page")] = page > self[NameObject("/Type")] = typ > > # from table 8.2 of the PDF 1.7 reference. > if typ == "/XYZ": > ( > self[NameObject(TA.LEFT)], > self[NameObject(TA.TOP)], > self[NameObject("/Zoom")], > ) = args > elif typ == TF.FIT_R: > ( > self[NameObject(TA.LEFT)], > self[NameObject(TA.BOTTOM)], > self[NameObject(TA.RIGHT)], > self[NameObject(TA.TOP)], > ) = args > elif typ in [TF.FIT_H, TF.FIT_BH]: > try: # Prefered to be more robust not only to null parameters > (self[NameObject(TA.TOP)],) = args > except Exception: > (self[NameObject(TA.TOP)],) = (NullObject(),) > elif typ in [TF.FIT_V, TF.FIT_BV]: > try: # Prefered to be more robust not only to null parameters > (self[NameObject(TA.LEFT)],) = args > except Exception: > (self[NameObject(TA.LEFT)],) = (NullObject(),) > elif typ in [TF.FIT, TF.FIT_B]: > pass > else: > > raise PdfReadError(f"Unknown Destination Type: {typ!r}") > E PyPDF2.errors.PdfReadError: Unknown Destination Type: 0 > > PyPDF2/generic/_data_structures.py:1089: PdfReadError > > During handling of the above exception, another exception occurred: > > caplog = <_pytest.logging.LogCaptureFixture object at 0x7fe2dd231a10> > strict = True > > @pytest.mark.parametrize( > "strict", > [True, False], > ) > def test_issue604(caplog, strict): > """Test with invalid destinations""" # todo > with open(RESOURCE_ROOT / "issue-604.pdf", "rb") as f: > pdf = None > outline = None > if strict: > pdf = PdfReader(f, strict=strict) > > with pytest.raises(PdfReadError) as exc, > > pytest.warns(PdfReadWarning): > E Failed: DID NOT WARN. No warnings of type (<class > 'PyPDF2.errors.PdfReadWarning'>,) were emitted. > E Emitted warnings: []. > > tests/test_reader.py:663: Failed > ------------------------------ Captured log call > ------------------------------- > WARNING PyPDF2._reader:_utils.py:375 Unknown destination: > ms_Thyroid_2_2020_071520_watermarked.pdf [0, 1] > > ---------- coverage: platform linux, python 3.11.8-final-0 ----------- > Name Stmts Miss Branch BrPart Cover > Missing > -------------------------------------------------------------------------------- > PyPDF2/__init__.py 9 0 0 0 100% > PyPDF2/_cmap.py 231 41 118 13 81% 38, > 43->42, 54-56, 120, 140-146, 150-157, 167-170, 211-212, 214, 282-295, > 300-311, 364, 370, 378-382, 403 > PyPDF2/_codecs/__init__.py 32 0 6 0 100% > PyPDF2/_codecs/adobe_glyphs.py 6 0 2 0 100% > PyPDF2/_codecs/pdfdoc.py 2 0 0 0 100% > PyPDF2/_codecs/std.py 1 0 0 0 100% > PyPDF2/_codecs/symbol.py 2 0 0 0 100% > PyPDF2/_codecs/zapfding.py 2 0 0 0 100% > PyPDF2/_encryption.py 371 101 140 8 73% > 61-112, 144, 156, 159, 178, 298, 352-358, 537, 546, 562-570, 577-580, > 590-593, 614-622, 641-651, 668-672, 768, 772, 780-781, 842-853, 879->881, > 881->883, 883->886 > PyPDF2/_merger.py 264 16 146 12 92% > 481-485, 490, 505->511, 511->503, 534->538, 590, 617->602, 635, 688-695, 697, > 770-777, 779 > PyPDF2/_page.py 671 91 378 43 85% > 121->125, 126, 407->406, 409->406, 532-538, 637-638, 641-642, 648->645, 650, > 680->685, 686->715, 752-753, 1074-1113, 1122, 1141-1143, 1163->exit, > 1164->1166, 1324, 1327-1328, 1329->1332, 1344->1352, 1346-1347, 1440-1441, > 1446, 1462, 1464, 1466, 1471, 1486-1488, 1496-1497, 1519-1520, 1541-1542, > 1579, 1589, 1608->exit, 1627->exit, 1630, 1642->exit, 1646->exit, 1649, > 1661->exit, 1663->exit, 1665->exit, 1668, 1680->exit, 1682-1683, 1690-1691, > 1693-1696, 1698-1699, 1714, 1719, 1726-1738, 1750, 1804->1809, 1864, > 2092->2095 > PyPDF2/_reader.py 866 128 416 41 83% 241, > 368, 544, 625->609, 633, 686, 689->692, 708->702, 711-715, 763, 766->768, > 776->780, 783->786, 811-815, 955-962, 965->977, 1102->1105, 1111->1113, > 1114->exit, 1151, 1160-1173, 1176-1178, 1209, 1214-1237, 1240-1241, 1249, > 1281-1302, 1350, 1389-1392, 1439-1440, 1482, 1489, 1521-1522, 1538-1562, > 1606, 1613-1614, 1618-1626, 1632-1635, 1656-1657, 1689-1690, 1696-1697, > 1705-1707, 1725, 1736-1739, 1763, 1766, 1827-1828, 1894, 1950-1963 > PyPDF2/_security.py 79 2 24 0 98% 41-44 > PyPDF2/_utils.py 190 2 76 1 99% > 59-60, 274->276 > PyPDF2/_version.py 1 0 0 0 100% > PyPDF2/_writer.py 651 38 288 30 92% 224, > 240->245, 269-270, 474->exit, 693, 697, 719-720, 826-837, 949->946, > 1086->1080, 1099, 1105-1110, 1206-1213, 1370-1377, 1379, 1503-1510, 1512, > 1597->1600, 1608, 1610-1614, 1620, 1629, 1658->1660, 1664->1660, 1667->1660, > 1672->1660, 1675->1660, 1726, 1989, 1992, 2028, 2032, 2134->2136, 2136->2138 > PyPDF2/constants.py 278 0 8 0 100% > PyPDF2/errors.py 21 0 0 0 100% > PyPDF2/filters.py 335 53 183 21 81% > 47-50, 73-74, 105->104, 117-123, 152, 161, 163-164, 168-182, 263, 295, 317, > 395, 446->448, 448->451, 516, 522->550, 527, 535, 539-542, 569-570, 590->600, > 605->609, 611, 632-643 > PyPDF2/generic/__init__.py 13 0 0 0 100% > PyPDF2/generic/_annotations.py 60 0 40 0 100% > PyPDF2/generic/_base.py 222 2 74 0 99% > 379-380 > PyPDF2/generic/_data_structures.py 617 32 254 13 94% > 170->173, 238, 254, 271-277, 283-289, 298, 304, 442->exit, 604-611, 700->698, > 766, 770, 794-798, 823, 1079-1080, 1180 > PyPDF2/generic/_outline.py 20 0 3 0 100% > PyPDF2/generic/_rectangle.py 77 1 40 0 99% 33 > PyPDF2/generic/_utils.py 99 0 50 0 100% > PyPDF2/pagerange.py 61 0 30 0 100% > PyPDF2/papersizes.py 14 0 0 0 100% > PyPDF2/types.py 22 4 0 0 82% 8-9, > 14-15 > PyPDF2/xmp.py 228 60 78 11 66% 118, > 121-126, 138-155, 164-179, 190, 192->198, 194, 198->200, 220-221, 235, > 250->249, 253, 269->268, 273, 292->291, 500-519 > -------------------------------------------------------------------------------- > TOTAL 5445 571 2354 193 88% > > =========================== short test summary info > ============================ > FAILED tests/test_reader.py::test_get_images_raw[True-True--1-True-] - > Failed... > FAILED tests/test_reader.py::test_get_images_raw[True-False-0-True-] - > Failed... > FAILED tests/test_reader.py::test_get_images_raw[True-True-0-True-] - > Failed:... > FAILED tests/test_reader.py::test_read_prev_0_trailer - Failed: DID NOT > WARN.... > FAILED tests/test_reader.py::test_read_unknown_zero_pages - Failed: DID NOT > W... > FAILED tests/test_reader.py::test_issue604[True] - Failed: DID NOT WARN. No > w... > ============= 6 failed, 576 passed, 5 skipped, 5 xfailed in 31.18s > ============= > make[1]: *** [debian/rules:35: override_dh_auto_test] Error 1 The full build log is available from: http://qa-logs.debian.net/2024/03/13/pypdf2_2.12.1-4_unstable.log All bugs filed during this archive rebuild are listed at: https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240313;users=lu...@debian.org or: https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20240313&fusertaguser=lu...@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results A list of current common problems and possible solutions is available at http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute! If you reassign this bug to another package, please mark it as 'affects'-ing this package. See https://www.debian.org/Bugs/server-control#affects If you fail to reproduce this, please provide a build log and diff it with mine so that we can identify if something relevant changed in the meantime.