Skip to content

Commit

Permalink
Update test expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
mara004 committed Dec 18, 2024
1 parent 5001bf9 commit b85745a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 26 deletions.
3 changes: 2 additions & 1 deletion docs/devel/changelog_staging.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
- `PdfPage.get_objects()`: Don't register pageobjects as children, because they don't need to be closed by the caller when part of a page. This avoids excessive caching of weakrefs that are not cleaned up with the object they refer to.
- Fixed another dotted filepath blunder in the `extract-images` CLI. (The `PdfImage.extract()` API is not affected this time.)
- Fixed installation with reference bindings (`PDFIUM_BINDINGS=reference`) by adding a missing `mkdir` call. (In older versions, this can be worked around by unpacking the sdist and creating the missing directory manually before installation.)
- Autorelease: Swapped default condition for minor/patch update, as pypdfium2 changes are likely more API-significant than pdfium updates. Added ability for manual override.
- Updated test expectations: due to changes in pdfium, some numbers are now slightly different.
- Fixed conda packaging: It is now required to explicitly specify `-c defaults` with `--override-channels`, presumably due to an upstream change.
- Autorelease: Swapped default condition for minor/patch update, as pypdfium2 changes are likely more API-significant than pdfium updates. Added ability for manual override.
- Bumped workflows to Python 3.12.
- Updated docs on licensing.
42 changes: 21 additions & 21 deletions tests/expectations/pdfinfo_multipage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,31 @@ Metadata:
ModDate: D:20211209144456Z

# Page 1
Size: (595.2756, 841.8897)
Size: (595.2756, 841.8898)
Rotation: 0
Bounding Box: (0.0, 0.0, 595.2756, 841.8897)
MediaBox: (0.0, 0.0, 595.2756, 841.8897)
CropBox: (0.0, 0.0, 595.2756, 841.8897)
BleedBox: (0.0, 0.0, 595.2756, 841.8897)
TrimBox: (0.0, 0.0, 595.2756, 841.8897)
ArtBox: (0.0, 0.0, 595.2756, 841.8897)
Bounding Box: (0.0, 0.0, 595.2756, 841.8898)
MediaBox: (0.0, 0.0, 595.2756, 841.8898)
CropBox: (0.0, 0.0, 595.2756, 841.8898)
BleedBox: (0.0, 0.0, 595.2756, 841.8898)
TrimBox: (0.0, 0.0, 595.2756, 841.8898)
ArtBox: (0.0, 0.0, 595.2756, 841.8898)

# Page 2
Size: (595.2756, 419.5275)
Size: (595.2756, 419.5276)
Rotation: 0
Bounding Box: (0.0, 0.0, 595.2756, 419.5275)
MediaBox: (0.0, 0.0, 595.2756, 419.5275)
CropBox: (0.0, 0.0, 595.2756, 419.5275)
BleedBox: (0.0, 0.0, 595.2756, 419.5275)
TrimBox: (0.0, 0.0, 595.2756, 419.5275)
ArtBox: (0.0, 0.0, 595.2756, 419.5275)
Bounding Box: (0.0, 0.0, 595.2756, 419.5276)
MediaBox: (0.0, 0.0, 595.2756, 419.5276)
CropBox: (0.0, 0.0, 595.2756, 419.5276)
BleedBox: (0.0, 0.0, 595.2756, 419.5276)
TrimBox: (0.0, 0.0, 595.2756, 419.5276)
ArtBox: (0.0, 0.0, 595.2756, 419.5276)

# Page 3
Size: (297.6378, 419.5275)
Size: (297.6378, 419.5276)
Rotation: 0
Bounding Box: (0.0, 0.0, 297.6378, 419.5275)
MediaBox: (0.0, 0.0, 297.6378, 419.5275)
CropBox: (0.0, 0.0, 297.6378, 419.5275)
BleedBox: (0.0, 0.0, 297.6378, 419.5275)
TrimBox: (0.0, 0.0, 297.6378, 419.5275)
ArtBox: (0.0, 0.0, 297.6378, 419.5275)
Bounding Box: (0.0, 0.0, 297.6378, 419.5276)
MediaBox: (0.0, 0.0, 297.6378, 419.5276)
CropBox: (0.0, 0.0, 297.6378, 419.5276)
BleedBox: (0.0, 0.0, 297.6378, 419.5276)
TrimBox: (0.0, 0.0, 297.6378, 419.5276)
ArtBox: (0.0, 0.0, 297.6378, 419.5276)
2 changes: 1 addition & 1 deletion tests/expectations/toc_maxdepth.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[+] 1.1.1.1.1.1.1.1.1.1.1.1.outline -> 1 # FitH [632.946]
[+] 1.1.1.1.1.1.1.1.1.1.1.1.1.outline -> 1 # FitH [632.946]
[+] 1.1.1.1.1.1.1.1.1.1.1.1.1.1.outline -> 1 # FitH [632.946]
[+] 2.outline -> 2 # FitH [749.4771]
[+] 2.outline -> 2 # FitH [749.477]
[+] 2.1.outline -> 2 # FitH [699.36]
[+] 2.1.1.outline -> 2 # FitH [628.74]
[*] 2.1.1.1.outline -> 2 # FitH [583.179]
Expand Down
7 changes: 4 additions & 3 deletions tests_old/test_pageobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,10 @@ def test_image_get_bitmap(render):
if render:
assert bitmap.format == pdfium_c.FPDFBitmap_BGRA
assert bitmap.n_channels == 4
assert bitmap.width == 216
assert bitmap.height == 90
assert bitmap.stride == 864
# Somewhere between pdfium 6462 and 6899, size/stride expectation changed here
assert bitmap.width == 217
assert bitmap.height == 91
assert bitmap.stride == 868
assert bitmap.rev_byteorder is False
output_path = OutputDir / "extract_rendered.png"
else:
Expand Down

0 comments on commit b85745a

Please sign in to comment.