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 | 8 |
1 files changed, 8 insertions, 0 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 bfd2bfa75836..c2079fa84f90 100644 --- a/nixpkgs/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh +++ b/nixpkgs/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh @@ -2,6 +2,7 @@ echo "Sourcing pytest-check-hook" declare -ar disabledTests +declare -ar disabledTestFiles function _concatSep { local result @@ -36,6 +37,13 @@ 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" + exit 1 + fi + args+=" --ignore=$file" + done args+=" ${pytestFlagsArray[@]}" eval "@pythonCheckInterpreter@ $args" |