From 77ebb549a5401e56f3e5c8ca4fab74971dec49c6 Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Sun, 18 May 2025 00:59:47 +0200 Subject: [PATCH] python312Packages.pythonefl: enable tests --- .../python-modules/python-efl/default.nix | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/python-efl/default.nix b/pkgs/development/python-modules/python-efl/default.nix index ddb6cdbd05a0..d227d8ac5f8a 100644 --- a/pkgs/development/python-modules/python-efl/default.nix +++ b/pkgs/development/python-modules/python-efl/default.nix @@ -13,6 +13,8 @@ dbus-python, + pytestCheckHook, + directoryListingUpdater, }: @@ -48,7 +50,30 @@ buildPythonPackage rec { NIX_CFLAGS_COMPILE="$(pkg-config --cflags efl evas) $NIX_CFLAGS_COMPILE" ''; - doCheck = false; + nativeCheckInputs = [ + pytestCheckHook + ]; + + preCheck = '' + # make sure we load the library from $out instead of the cwd + # because cwd doesn't contain the built extensions + rm -r efl/ + + patchShebangs tests/ecore/exe_helper.sh + + # use the new name instead of the removed alias + substituteInPlace tests/evas/test_01_rect.py \ + --replace-fail ".assert_(" ".assertTrue(" + ''; + + pytestFlagsArray = [ "tests/" ]; + + disabledTestPaths = [ + "tests/dbus/test_01_basics.py" # needs dbus daemon + "tests/ecore/test_09_file_download.py" # uses network + "tests/ecore/test_11_con.py" # uses network + "tests/elementary/test_02_image_icon.py" # RuntimeWarning: Setting standard icon failed + ]; passthru.updateScript = directoryListingUpdater { };