summary refs log tree commit diff
path: root/pkgs/development/interpreters/python/hooks
diff options
context:
space:
mode:
authorRobert T. McGibbon <rmcgibbo@gmail.com>2021-02-19 09:58:39 -0500
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-05-14 21:59:55 -0700
commit2e55b7301bdfa9a5a5e0dfa18bb99d9a2c13e12d (patch)
tree78169aacd35515b89fc5542ad4a024ae5e39da9d /pkgs/development/interpreters/python/hooks
parent7dd53fe56e52c6b0193575aca4fd5c3732a01e83 (diff)
downloadnixpkgs-2e55b7301bdfa9a5a5e0dfa18bb99d9a2c13e12d.tar
nixpkgs-2e55b7301bdfa9a5a5e0dfa18bb99d9a2c13e12d.tar.gz
nixpkgs-2e55b7301bdfa9a5a5e0dfa18bb99d9a2c13e12d.tar.bz2
nixpkgs-2e55b7301bdfa9a5a5e0dfa18bb99d9a2c13e12d.tar.lz
nixpkgs-2e55b7301bdfa9a5a5e0dfa18bb99d9a2c13e12d.tar.xz
nixpkgs-2e55b7301bdfa9a5a5e0dfa18bb99d9a2c13e12d.tar.zst
nixpkgs-2e55b7301bdfa9a5a5e0dfa18bb99d9a2c13e12d.zip
pytestCheckHook: improve disabledTestPaths whitespace handling
Diffstat (limited to 'pkgs/development/interpreters/python/hooks')
-rw-r--r--pkgs/development/interpreters/python/hooks/pytest-check-hook.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh b/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh
index eb45205ff73..0f708f88829 100644
--- a/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh
+++ b/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh
@@ -2,7 +2,7 @@
 echo "Sourcing pytest-check-hook"
 
 declare -ar disabledTests
-declare -ar disabledTestPaths
+declare -a disabledTestPaths
 
 function _concatSep {
     local result
@@ -37,6 +37,11 @@ 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"