Mercurial > hgrepos > Python2 > PyMuPDF
comparison tests/test_4716.py @ 39:a6bc019ac0b2 upstream
ADD: PyMuPDF v1.26.5: the original sdist.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sat, 11 Oct 2025 11:19:58 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 2:b50eed0cc0ef | 39:a6bc019ac0b2 |
|---|---|
| 1 import pymupdf | |
| 2 import os | |
| 3 | |
| 4 def 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 |
