Description
Describe the bug (mandatory)
Trying to run the test suite after installing pymupdf from source returned 68 failed tests. All of them fail with an AttributeError exception. All with one of the two messages bellow.
"AttributeError: 'SwigPyObject' object has no attribute 'thisown'"
"AttributeError: 'SwigPyObject' object has no attribute 'bodytag'"
At the end, there is also these lines.
"swig/python detected a memory leak of type 'Annot *', no destructor found.
"swig/python detected a memory leak of type 'Outline *', no destructor found.
To Reproduce (mandatory)
Install pymupdf with pip, copy the tests/ directory from the source tarball.
From a virtual environment:
$ pip install --no-binary :all: pymupdf
$ pytest -k 'not test_textbox3' tests/
Your configuration (mandatory)
I'm running Gentoo on a amd64.
GNU C compiler version: 12.2.1
Swig version: 4.1.1
PyMuPDF 1.21.1: Python bindings for the MuPDF 1.21.1 library.
Version date: 2022-12-13 00:00:01
Built for Python 3.10 on linux (64-bit).
With pymupdf installed from the binary distribution, all tests pass on this box.