python3Packages.pytestCheckHook: append disableTests flags after disabledTestPaths flags

This commit is contained in:
Yueh-Shun Li
2025-03-09 22:20:16 +08:00
parent 25c03bd700
commit 6bdb735bbe
@@ -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[*]-})"