Skip to content

Commit

Permalink
docs/installation.rst: added information about running tests.
Browse files Browse the repository at this point in the history
Also mention exclusion of test_textbox3() with non-standard MuPDF; this
partially addresses pymupdf#2040.
  • Loading branch information
julian-smith-artifex-com committed Nov 21, 2022
1 parent 6b3b6c0 commit b13a2d5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/installation.rst
Expand Up @@ -97,6 +97,25 @@ Install from source without using an sdist
``fitz/`` directory, which will fail because it only contains source files.


Running tests
~~~~~~~~~~~~~

PyMuPDF has a set of ``pytest`` scripts within the ``tests/`` directory.

Run tests with::

pip install pytest fontTools
pytest PyMuPDF/tests

If PyMuPDF has been built with a non-default build of MuPDF (using
environmental variable ``PYMUPDF_SETUP_MUPDF_BUILD``), it is possible that
``tests/test_textbox.py:test_textbox3()`` will fail, because it relies on MuPDF
having been built with PyMuPDF's customized configuration, ``fitz/_config.h``.

One can skip this particular test by adding ``-k 'not test_textbox3'`` to the
pytest command line.


Enabling Integrated OCR Support
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you do not intend to use this feature, skip this step. Otherwise, it is required for both installation paths: **from wheels and from sources.**
Expand Down

0 comments on commit b13a2d5

Please sign in to comment.