mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
python3Packages.pytestCheckHook: fix disabledTestPaths glob matching assertion
Errors in Bash's process substitution doesn't get propagated outside. Replace the process substitution with Python's `-` as /dev/stdin and Bash's heredoc stdin redirection.
This commit is contained in:
parent
db42c3a6c0
commit
2e512e7cf7
1 changed files with 1 additions and 2 deletions
|
@ -18,7 +18,7 @@ function pytestCheckPhase() {
|
|||
concatTo _pathsArray disabledTestPaths
|
||||
for path in "${_pathsArray[@]}"; do
|
||||
# Check if every path glob matches at least one path
|
||||
@pythonCheckInterpreter@ <(cat <<EOF
|
||||
@pythonCheckInterpreter@ - "$path" <<EOF
|
||||
import glob
|
||||
import sys
|
||||
path_glob=sys.argv[1]
|
||||
|
@ -27,7 +27,6 @@ if not len(path_glob):
|
|||
if next(glob.iglob(path_glob), None) is None:
|
||||
sys.exit('Disabled tests path glob "{}" does not match any paths. Aborting'.format(path_glob))
|
||||
EOF
|
||||
) "$path"
|
||||
flagsArray+=("--ignore-glob=$path")
|
||||
done
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue