diff options
Diffstat (limited to 'pkgs/development/interpreters/python/hooks/pytest-check-hook.sh')
-rw-r--r-- | pkgs/development/interpreters/python/hooks/pytest-check-hook.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh b/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh index bfd2bfa7583..0f708f88829 100644 --- a/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh +++ b/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh @@ -2,6 +2,7 @@ echo "Sourcing pytest-check-hook" declare -ar disabledTests +declare -a disabledTestPaths function _concatSep { local result @@ -36,6 +37,18 @@ function pytestCheckPhase() { disabledTestsString=$(_pytestComputeDisabledTestsString "${disabledTests[@]}") args+=" -k \""$disabledTestsString"\"" fi + + if [ -n "${disabledTestPaths-}" ]; then + eval "disabledTestPaths=($disabledTestPaths)" + fi + + for path in ${disabledTestPaths[@]}; do + if [ ! -e "$path" ]; then + echo "Disabled tests path \"$path\" does not exist. Aborting" + exit 1 + fi + args+=" --ignore=\"$path\"" + done args+=" ${pytestFlagsArray[@]}" eval "@pythonCheckInterpreter@ $args" |