We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2757511 commit 8a80e6aCopy full SHA for 8a80e6a
1 file changed
tests/zim/test_indexing.py
@@ -296,10 +296,12 @@ def test_get_pdf_index_data(
296
filepath=encrypted_pdf_file if pdf_no == 1 else big_pdf_file
297
)
298
assert index_data.get_title() == expected_title
299
- assert (
300
- index_data.get_content()
301
- == (encrypted_pdf_content if pdf_no == 1 else big_pdf_content).read_text()
+ # actual index content is dependent on the MuPDF version used by PyMuPDF
+ # this checks that index is large-enough
+ content_size = len(
302
+ (encrypted_pdf_content if pdf_no == 1 else big_pdf_content).read_text()
303
304
+ assert len(index_data.get_content()) >= content_size * 0.9
305
assert index_data.has_indexdata()
306
assert index_data.get_wordcount() == expected_word_count
307
assert index_data.get_keywords() == ""
0 commit comments