Skip to content

Commit b85745a

Browse files
committed
Update test expectations
1 parent 5001bf9 commit b85745a

File tree

4 files changed

+28
-26
lines changed

4 files changed

+28
-26
lines changed

docs/devel/changelog_staging.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
- `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.
99
- Fixed another dotted filepath blunder in the `extract-images` CLI. (The `PdfImage.extract()` API is not affected this time.)
1010
- 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.)
11-
- Autorelease: Swapped default condition for minor/patch update, as pypdfium2 changes are likely more API-significant than pdfium updates. Added ability for manual override.
11+
- Updated test expectations: due to changes in pdfium, some numbers are now slightly different.
1212
- Fixed conda packaging: It is now required to explicitly specify `-c defaults` with `--override-channels`, presumably due to an upstream change.
13+
- Autorelease: Swapped default condition for minor/patch update, as pypdfium2 changes are likely more API-significant than pdfium updates. Added ability for manual override.
1314
- Bumped workflows to Python 3.12.
1415
- Updated docs on licensing.

tests/expectations/pdfinfo_multipage.txt

+21-21
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,31 @@ Metadata:
1111
ModDate: D:20211209144456Z
1212

1313
# Page 1
14-
Size: (595.2756, 841.8897)
14+
Size: (595.2756, 841.8898)
1515
Rotation: 0
16-
Bounding Box: (0.0, 0.0, 595.2756, 841.8897)
17-
MediaBox: (0.0, 0.0, 595.2756, 841.8897)
18-
CropBox: (0.0, 0.0, 595.2756, 841.8897)
19-
BleedBox: (0.0, 0.0, 595.2756, 841.8897)
20-
TrimBox: (0.0, 0.0, 595.2756, 841.8897)
21-
ArtBox: (0.0, 0.0, 595.2756, 841.8897)
16+
Bounding Box: (0.0, 0.0, 595.2756, 841.8898)
17+
MediaBox: (0.0, 0.0, 595.2756, 841.8898)
18+
CropBox: (0.0, 0.0, 595.2756, 841.8898)
19+
BleedBox: (0.0, 0.0, 595.2756, 841.8898)
20+
TrimBox: (0.0, 0.0, 595.2756, 841.8898)
21+
ArtBox: (0.0, 0.0, 595.2756, 841.8898)
2222

2323
# Page 2
24-
Size: (595.2756, 419.5275)
24+
Size: (595.2756, 419.5276)
2525
Rotation: 0
26-
Bounding Box: (0.0, 0.0, 595.2756, 419.5275)
27-
MediaBox: (0.0, 0.0, 595.2756, 419.5275)
28-
CropBox: (0.0, 0.0, 595.2756, 419.5275)
29-
BleedBox: (0.0, 0.0, 595.2756, 419.5275)
30-
TrimBox: (0.0, 0.0, 595.2756, 419.5275)
31-
ArtBox: (0.0, 0.0, 595.2756, 419.5275)
26+
Bounding Box: (0.0, 0.0, 595.2756, 419.5276)
27+
MediaBox: (0.0, 0.0, 595.2756, 419.5276)
28+
CropBox: (0.0, 0.0, 595.2756, 419.5276)
29+
BleedBox: (0.0, 0.0, 595.2756, 419.5276)
30+
TrimBox: (0.0, 0.0, 595.2756, 419.5276)
31+
ArtBox: (0.0, 0.0, 595.2756, 419.5276)
3232

3333
# Page 3
34-
Size: (297.6378, 419.5275)
34+
Size: (297.6378, 419.5276)
3535
Rotation: 0
36-
Bounding Box: (0.0, 0.0, 297.6378, 419.5275)
37-
MediaBox: (0.0, 0.0, 297.6378, 419.5275)
38-
CropBox: (0.0, 0.0, 297.6378, 419.5275)
39-
BleedBox: (0.0, 0.0, 297.6378, 419.5275)
40-
TrimBox: (0.0, 0.0, 297.6378, 419.5275)
41-
ArtBox: (0.0, 0.0, 297.6378, 419.5275)
36+
Bounding Box: (0.0, 0.0, 297.6378, 419.5276)
37+
MediaBox: (0.0, 0.0, 297.6378, 419.5276)
38+
CropBox: (0.0, 0.0, 297.6378, 419.5276)
39+
BleedBox: (0.0, 0.0, 297.6378, 419.5276)
40+
TrimBox: (0.0, 0.0, 297.6378, 419.5276)
41+
ArtBox: (0.0, 0.0, 297.6378, 419.5276)

tests/expectations/toc_maxdepth.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[+] 1.1.1.1.1.1.1.1.1.1.1.1.outline -> 1 # FitH [632.946]
1414
[+] 1.1.1.1.1.1.1.1.1.1.1.1.1.outline -> 1 # FitH [632.946]
1515
[+] 1.1.1.1.1.1.1.1.1.1.1.1.1.1.outline -> 1 # FitH [632.946]
16-
[+] 2.outline -> 2 # FitH [749.4771]
16+
[+] 2.outline -> 2 # FitH [749.477]
1717
[+] 2.1.outline -> 2 # FitH [699.36]
1818
[+] 2.1.1.outline -> 2 # FitH [628.74]
1919
[*] 2.1.1.1.outline -> 2 # FitH [583.179]

tests_old/test_pageobject.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,10 @@ def test_image_get_bitmap(render):
201201
if render:
202202
assert bitmap.format == pdfium_c.FPDFBitmap_BGRA
203203
assert bitmap.n_channels == 4
204-
assert bitmap.width == 216
205-
assert bitmap.height == 90
206-
assert bitmap.stride == 864
204+
# Somewhere between pdfium 6462 and 6899, size/stride expectation changed here
205+
assert bitmap.width == 217
206+
assert bitmap.height == 91
207+
assert bitmap.stride == 868
207208
assert bitmap.rev_byteorder is False
208209
output_path = OutputDir / "extract_rendered.png"
209210
else:

0 commit comments

Comments
 (0)