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