MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / test_4716

Function test_4716

tests/test_4716.py:4–15  ·  view source on GitHub ↗

Confirm that ZERO WIDTH JOINER will never start a word.

()

Source from the content-addressed store, hash-verified

2import os
3
4def test_4716():
5 """Confirm that ZERO WIDTH JOINER will never start a word."""
6 script_dir = os.path.dirname(__file__)
7 filename = os.path.join(script_dir, "resources", "test_4716.pdf")
8 doc = pymupdf.open(filename)
9 expected = set(["+25.00", "Любимый", "-10.00"])
10 word_text = set()
11 for page in doc:
12 words = page.get_text("words")
13 for w in words:
14 word_text.add(w[4])
15 assert word_text == expected

Callers

nothing calls this directly

Calls 2

get_textMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…