TST: Increase test coverage for flate handling of image mode 1#2339
Merged
MartinThoma merged 6 commits intopy-pdf:mainfrom Dec 18, 2023
Merged
TST: Increase test coverage for flate handling of image mode 1#2339MartinThoma merged 6 commits intopy-pdf:mainfrom
MartinThoma merged 6 commits intopy-pdf:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2339 +/- ##
==========================================
+ Coverage 94.27% 94.33% +0.05%
==========================================
Files 43 43
Lines 7670 7676 +6
Branches 1520 1522 +2
==========================================
+ Hits 7231 7241 +10
+ Misses 271 269 -2
+ Partials 168 166 -2 ☔ View full report in Codecov by Sentry. |
MartinThoma
reviewed
Dec 17, 2023
MartinThoma
added a commit
that referenced
this pull request
Dec 24, 2023
## What's new ### Bug Fixes (BUG) - Handle IndirectObject as image filter (#2355) by @stefan6419846 ### Documentation (DOC) - Quote specs in generate_file_identifiers (#2363) by @exiledkingcc - Notes about form fields and annotations (#1945) by @dmjohnsson23 - Notes about update_page_form_field_values(auto_regenerate) (#2359) by @dmjohnsson23 - Fix stamping example (#2358) by @dmjohnsson23 - Stamp images directly on a PDF (#2357) by @dmjohnsson23 - Correct the example of adding highlight annotation (#2341) by @Tobeabellwether ### Maintenance (MAINT) - Update upload-artifact and download-artifact actions from v3 to v4 (#2352) by @stefan6419846 ### Testing (TST) - Add xfail test for #2336 (#2365) by @MartinThoma - Increase test coverage for flate handling of image mode 1 (#2339) by @stefan6419846 ### Code Style (STY) - File identifier generation restructuring (#2362) by @exiledkingcc - Add PdfWriter._ID attribute (#2361) by @exiledkingcc - Variable naming convention (#2360) by @MartinThoma [Full Changelog](3.17.3...3.17.4)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As mentioned in #2331, this will improve the test coverage for the edge cases.
Please note that I observed some need for further refactoring during the tests, as iterating over
byteswill yield integers instead of single bytes and thus the whitespace check has been broken. Additionally, the whitespace check has previously always been performed on the shortened bytes data, which is rather useless - I somehow missed this previously.