Skip to content

Commit eb32057

Browse files
tests/: added test_5054().
Currently expects incorrect behaviour for all mupdf versions; will update the test when mupdf is fixed.
1 parent c47e4c1 commit eb32057

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

‎tests/resources/test_5054.pdf‎

603 Bytes
Binary file not shown.

‎tests/test_general.py‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2256,3 +2256,19 @@ def test_5056():
22562256
assert text_normal in data_normal
22572257
assert text_normal not in data_repro
22582258
assert text_repro in data_repro
2259+
2260+
2261+
def test_5054():
2262+
path = os.path.normpath(f'{__file__}/../../tests/resources/test_5054.pdf')
2263+
with pymupdf.open(path) as document:
2264+
page = document[0]
2265+
text1 = page.get_text()
2266+
page.clean_contents(sanitize=True)
2267+
text2 = page.get_text()
2268+
print(f'{text1=}')
2269+
print(f'{text2=}')
2270+
if 1:
2271+
# Currently fails for all mupdf versions.
2272+
assert text2 != text1
2273+
else:
2274+
assert text2 == text1

0 commit comments

Comments
 (0)