Dear all,

I wonder whether you might have any clue about
https://bugs.debian.org/1013700
I have mostly worked out the "cause" of the bug, but I haven't quite
got to the bottom of it.
When running the command
PYTHONPATH=. python3.10 -m pytest qtpy/tests
in the directory .pybuild/cpython3_3.10_qtpy/build, I get the error
message:

ImportError while loading conftest 
'/home/jdg/debian/spyder-packages/qtpy/build-area/python-qtpy-2.1.0/.pybuild/cpython3_3.10_qtpy/build/qtpy/tests/conftest.py'.
TypeError: the 'package' argument is required to perform a relative import for 
'.pybuild.cpython3_3.10_qtpy.build.qtpy.tests'

If the directory .pybuild is renamed to pybuild, the tests run without
a problem.  So there seems to be something funny about conftest.py
(and removing all of the other files from the qtpy/tests directory
except for the empty __init__.py gives the same error); here's a link
to it:

https://salsa.debian.org/python-team/packages/python-qtpy/-/blob/master/qtpy/tests/conftest.py

But there doesn't seem to be anything out of the ordinary about this.
So I am mystified: why does pytest 7.x seem to not give this error on
any other Debian package?

The only solution I currently have for this package is skip the tests
at build time and rely on autopkgtest to do them.

Best wishes,

   Julian

Reply via email to