Mercurial > hgrepos > Python2 > PyMuPDF
comparison tests/README.md @ 1:1d09e1dec1d9 upstream
ADD: PyMuPDF v1.26.4: the original sdist.
It does not yet contain MuPDF. This normally will be downloaded when
building PyMuPDF.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:37:51 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 1:1d09e1dec1d9 |
|---|---|
| 1 # PyMuPDF tests | |
| 2 | |
| 3 To run these tests: | |
| 4 | |
| 5 * Create and enter a venv. | |
| 6 * Install PyMuPDF. | |
| 7 * Install the Python packages listed in | |
| 8 `PyMuPDF/scripts/gh_release.py:test_packages`. | |
| 9 * Run pytest on the PyMuPDF directory. | |
| 10 | |
| 11 For example, as of 2023-12-11: | |
| 12 | |
| 13 ``` | |
| 14 > python -m pip install pytest fontTools psutil pymupdf-fonts pillow | |
| 15 > pytest PyMuPDF | |
| 16 ============================= test session starts ============================== | |
| 17 platform linux -- Python 3.11.2, pytest-7.4.3, pluggy-1.3.0 | |
| 18 rootdir: /home/jules/artifex-remote/PyMuPDF | |
| 19 configfile: pytest.ini | |
| 20 collected 171 items | |
| 21 | |
| 22 PyMuPDF/tests/test_2548.py . [ 0%] | |
| 23 PyMuPDF/tests/test_2634.py . [ 1%] | |
| 24 PyMuPDF/tests/test_2736.py . [ 1%] | |
| 25 PyMuPDF/tests/test_2791.py . [ 2%] | |
| 26 PyMuPDF/tests/test_2861.py . [ 2%] | |
| 27 PyMuPDF/tests/test_annots.py .................. [ 13%] | |
| 28 PyMuPDF/tests/test_badfonts.py . [ 14%] | |
| 29 PyMuPDF/tests/test_crypting.py . [ 14%] | |
| 30 PyMuPDF/tests/test_docs_samples.py ............. [ 22%] | |
| 31 PyMuPDF/tests/test_drawings.py ...... [ 25%] | |
| 32 PyMuPDF/tests/test_embeddedfiles.py . [ 26%] | |
| 33 PyMuPDF/tests/test_extractimage.py .. [ 27%] | |
| 34 PyMuPDF/tests/test_flake8.py . [ 28%] | |
| 35 PyMuPDF/tests/test_font.py ..... [ 30%] | |
| 36 PyMuPDF/tests/test_general.py .......................................... [ 55%] | |
| 37 ... [ 57%] | |
| 38 PyMuPDF/tests/test_geometry.py ........ [ 61%] | |
| 39 PyMuPDF/tests/test_imagebbox.py .. [ 63%] | |
| 40 PyMuPDF/tests/test_insertimage.py .. [ 64%] | |
| 41 PyMuPDF/tests/test_insertpdf.py .. [ 65%] | |
| 42 PyMuPDF/tests/test_linequad.py . [ 66%] | |
| 43 PyMuPDF/tests/test_metadata.py .. [ 67%] | |
| 44 PyMuPDF/tests/test_nonpdf.py ... [ 69%] | |
| 45 PyMuPDF/tests/test_object_manipulation.py .... [ 71%] | |
| 46 PyMuPDF/tests/test_optional_content.py .. [ 72%] | |
| 47 PyMuPDF/tests/test_pagedelete.py . [ 73%] | |
| 48 PyMuPDF/tests/test_pagelabels.py . [ 73%] | |
| 49 PyMuPDF/tests/test_pixmap.py .......... [ 79%] | |
| 50 PyMuPDF/tests/test_showpdfpage.py . [ 80%] | |
| 51 PyMuPDF/tests/test_story.py ... [ 81%] | |
| 52 PyMuPDF/tests/test_tables.py ... [ 83%] | |
| 53 PyMuPDF/tests/test_tesseract.py . [ 84%] | |
| 54 PyMuPDF/tests/test_textbox.py ...... [ 87%] | |
| 55 PyMuPDF/tests/test_textextract.py .. [ 88%] | |
| 56 PyMuPDF/tests/test_textsearch.py .. [ 90%] | |
| 57 PyMuPDF/tests/test_toc.py ........ [ 94%] | |
| 58 PyMuPDF/tests/test_widgets.py ........ [ 99%] | |
| 59 PyMuPDF/tests/test_word_delimiters.py . [100%] | |
| 60 | |
| 61 ======================== 171 passed in 78.65s (0:01:18) ======================== | |
| 62 > | |
| 63 ``` | |
| 64 | |
| 65 ## Known test failure with non-default build of MuPDF | |
| 66 | |
| 67 If PyMuPDF has been built with a non-default build of MuPDF (using | |
| 68 environmental variable ``PYMUPDF_SETUP_MUPDF_BUILD``), it is possible that | |
| 69 ``tests/test_textbox.py:test_textbox3()`` will fail, because it relies on MuPDF | |
| 70 having been built with PyMuPDF's customized configuration, ``fitz/_config.h``. | |
| 71 | |
| 72 One can skip this particular test by adding ``-k 'not test_textbox3'`` to the | |
| 73 pytest command line. | |
| 74 | |
| 75 | |
| 76 ## Resuming at a particular test. | |
| 77 | |
| 78 To skip tests before a particular test, set PYMUPDF_PYTEST_RESUME to the name | |
| 79 of the function. | |
| 80 | |
| 81 For example PYMUPDF_PYTEST_RESUME=test_haslinks. |
