From 07d5c6bc856f2a76287a070e2df4e7f6cf14f478 Mon Sep 17 00:00:00 2001 From: Harinn Date: Fri, 5 Jun 2026 09:41:18 +0700 Subject: [PATCH] python3Packages.anyqt: re-enable tests via offscreen Qt platform --- .../python-modules/anyqt/default.nix | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/anyqt/default.nix b/pkgs/development/python-modules/anyqt/default.nix index e2b5bcdc227c..2e5ff8732a64 100644 --- a/pkgs/development/python-modules/anyqt/default.nix +++ b/pkgs/development/python-modules/anyqt/default.nix @@ -4,7 +4,9 @@ fetchFromGitHub, pyqt5, pytestCheckHook, + qt5, setuptools, + writableTmpDirAsHomeHook, nix-update-script, }: @@ -25,19 +27,13 @@ buildPythonPackage (finalAttrs: { nativeCheckInputs = [ pyqt5 pytestCheckHook + writableTmpDirAsHomeHook ]; - # All of these fail because Qt modules cannot be imported - disabledTestPaths = [ - "tests/test_qabstractitemview.py" - "tests/test_qaction_set_menu.py" - "tests/test_qactionevent_action.py" - "tests/test_qfontdatabase_static.py" - "tests/test_qpainter_draw_pixmap_fragments.py" - "tests/test_qsettings.py" - "tests/test_qstandarditem_insertrow.py" - "tests/test_qtest.py" - ]; + preCheck = '' + export QT_PLUGIN_PATH="${lib.getBin qt5.qtbase}/${qt5.qtbase.qtPluginPrefix}" + export QT_QPA_PLATFORM=offscreen + ''; pythonImportsCheck = [ "AnyQt" ];