Control: reassign -1 napari-console 0.1.3-1
Control: tags + patch
Hey,
if you would have enabled --capture=no in the pytest call you can see the issue is not inside pytest. That's why I reassign the issue.
"
_tests/test_qt_console.py::test_console qt.qpa.xcb: could not connect to display
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: linuxfb, minimal, offscreen, vkkhrdisplay, xcb,
eglfs, minimalegl.
"
This means you need to run the tests with a GUI. The simplest way to do this is add xvfb and xauth to dependencies and just prefix xvfb-run to dh_auto_test
and the call for the autopkgtests:
xvfb-run $py -m pytest --verbosity=2
Btw. please enable dh_auto_test, to see the failures directly, when you build the package.
Unfortunately xvfb cannot handle the focus, so you either skip those tests or you need to run a minimal wm. here the docu:
https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#xvfb-assertionerror-timeouterror-when-using-waituntil-waitexposed-and-ui-events
translated into d/rules:
override_dh_auto_test:
export DISPLAY=:99.0
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/ custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99
herbstluftwm & echo $$! > /tmp/herbstluftwm.PID
dh_auto_test
kill -TERM $$(cat /tmp/herbstluftwm.PID)
/sbin/start-stop-daemon --stop --quiet --pidfile /tmp/custom_xvfb_99.pid
Regards,
hefee
--
On Thu, 10 Apr 2025 20:34:04 +0200 Roland Mas <
[email protected]> wrote:
Package: python3-pytestqt
Version: 4.4.0-1
Severity: important
Dear Maintainer,
Several packages using python3-pytestqt fail with "Fatal Python error: Aborted" during their autopkgtest runs; by tweaking the pytest
invocation, I've been able to track down the problem to this package. To reproduce, fetch, for instance, the "napari-console" source package (currently at version 0.1.3-1). Add the following two lines to the top
of debian/rules
export PYBUILD_TEST_CUSTOM=1
export PYBUILD_TEST_ARGS={interpreter} -X faulthandler -m pytest -p no:faulthandler -v
Then run the build and the autopkgtest, you should see the error happen.
It does happen on my desktop computer with a cowbuilder chroot, and on
the Debian CI infrastructure. From the latter (https://ci.debian.net/packages/n/napari-console/testing/amd64/59383781/):
151s autopkgtest [08:08:15]: test command1: [-----------------------
151s Testing with python3.13:
152s ============================= test session starts ==============================
152s platform linux -- Python 3.13.2, pytest-8.3.5, pluggy-1.5.0 -- /usr/bin/python3.13
152s cachedir: .pytest_cache
152s PyQt5 5.15.11 -- Qt runtime 5.15.15 -- Qt compiled 5.15.15
152s rootdir: /tmp/autopkgtest-lxc.0y1wz5tp/downtmp/autopkgtest_tmp
152s plugins: qt-4.4.0, napari-0.5.6, npe2-0.7.8, napari-plugin-engine-0.2.0, typeguard-4.4.2
152s collecting ... collected 5 items
152s
152s _tests/test_qt_console.py::test_console Fatal Python error: Aborted
152s
152s Current thread 0x00007fa67f460100 (most recent call first):
152s File "/usr/lib/python3/dist-packages/pytestqt/plugin.py", line 76
in qapp
152s File "/usr/lib/python3/dist-packages/_pytest/fixtures.py", line 898
in call_fixture_func
152s File "/usr/lib/python3/dist-packages/_pytest/fixtures.py", line
1140 in pytest_fixture_setup
152s File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 103
in _multicall
152s File "/usr/lib/python3/dist-packages/pluggy/_manager.py", line 120
in _hookexec
152s File "/usr/lib/python3/dist-packages/pluggy/_hooks.py", line 513 in __call__
152s File "/usr/lib/python3/dist-packages/_pytest/fixtures.py", line
1091 in execute
152s File "/usr/lib/python3/dist-packages/_pytest/fixtures.py", line 617
in _get_active_fixturedef
152s File "/usr/lib/python3/dist-packages/_pytest/fixtures.py", line 532
in getfixturevalue
152s File "/usr/lib/python3/dist-packages/_pytest/fixtures.py", line 697
in _fillfixtures
152s File "/usr/lib/python3/dist-packages/_pytest/python.py", line 1630
in setup
--
Mein öffentlicher Schlüssel / My public key: 0x19221BC085BE851F
Fingerabdruck / Fingerprint:
EF09 31C4 ACED 4606 C314 0E7C 1922 1BC0 85BE 851F
runterladen/download:
https://keys.openpgp.org/vks/v1/by-fingerprint/ EF0931C4ACED4606C3140E7C19221BC085BE851F
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEOewRoCAWtykmSRoG462wCFBgVjYFAmgOXwwACgkQ462wCFBg VjaGNQ/+Nyjhp58Zl7CwD4XZdnxxXehHz7PuWG2q5snW3DQiah5R9ikRoN80fdTB b1c36EEyvsyJJw3Smw3tHnTQNAy5yvziURUHDl1bjDUhAR2uBvzidQHJjqq84JRi q8Xt22wbBwkuwvXJDsZPmY8QKUettjuUGNxcfO8k0XzoPq76+hAiVvxgPSTcrjxY 4j7v4Q0KpIDmpxAUqMjjax7LHBIbRzDmOsGDn6jFEmL/KULMr8T+YnGTzue8x99l QaZJi+d0rx4cdu9LNZVZ6sWkc34cWBpO3+SDInMo09P2GcCP80itz0G8AEQ7lNNT eSAtTwzBsIWqERHjJwj4RDuqtUvuLcmpdS8cNwMTEpho/djL4gJkuwpvcwST8N0L M3RYNPx6/KgghM3dkV1KrTNFABnxOwLasB6aNc6gWabq0lT9AHRTlDalqPeCT/yV is700SsCQUKZQQ2qlNRYVTEMbWW+2RQGr4VwAVjqmprJARde3IsanwKpFPfdV3Oi DwEl/8ISQVywcCpybEg9noe33fyk9TBbK8tQPlEj4tFJW4NtdIdyKQ/6bBXbc7Kk V1QwzKUI7EmO+WiCz2Jmm1J+vKQZhbxcCQtoxswsphj7sC5EsT0we8gjxKVIilwT