From 6bdb735bbe97c94b9a8191259effca71c741c746 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Sun, 2 Mar 2025 18:25:22 +0800 Subject: [PATCH] python3Packages.pytestCheckHook: append disableTests flags after disabledTestPaths flags --- .../interpreters/python/hooks/pytest-check-hook.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh b/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh index ff95f73ba20c..1696b180b3f6 100644 --- a/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh +++ b/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh @@ -9,10 +9,6 @@ function pytestCheckPhase() { # Compose arguments local -a flagsArray=(-m pytest) - if [ -n "${disabledTests[*]-}" ]; then - disabledTestsString="not $(concatStringsSep " and not " disabledTests)" - flagsArray+=(-k "$disabledTestsString") - fi local -a _pathsArray=() concatTo _pathsArray disabledTestPaths @@ -30,6 +26,11 @@ EOF flagsArray+=("--ignore-glob=$path") done + if [ -n "${disabledTests[*]-}" ]; then + disabledTestsString="not $(concatStringsSep " and not " disabledTests)" + flagsArray+=(-k "$disabledTestsString") + fi + # Compatibility layer to the obsolete pytestFlagsArray eval "flagsArray+=(${pytestFlagsArray[*]-})"