File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -320,6 +320,14 @@ function pip_install {
320320 fi
321321
322322 $xtrace
323+
324+ # Also install test requirements
325+ local install_test_reqs=" "
326+ local test_req=" ${!# } /test-requirements.txt"
327+ if [[ -e " $test_req " ]]; then
328+ install_test_reqs=" -r $test_req "
329+ fi
330+
323331 # adding SETUPTOOLS_SYS_PATH_TECHNIQUE is a workaround to keep
324332 # the same behaviour of setuptools before version 25.0.0.
325333 # related issue: https://github.com/pypa/pip/issues/3874
@@ -329,24 +337,10 @@ function pip_install {
329337 no_proxy=" ${no_proxy:- } " \
330338 PIP_FIND_LINKS=$PIP_FIND_LINKS \
331339 SETUPTOOLS_SYS_PATH_TECHNIQUE=rewrite \
332- $cmd_pip $upgrade \
340+ $cmd_pip $upgrade $install_test_reqs \
333341 $@
334342 result=$?
335343
336- # Also install test requirements
337- local test_req=" ${!# } /test-requirements.txt"
338- if [[ $result == 0 ]] && [[ -e " $test_req " ]]; then
339- echo " Installing test-requirements for $test_req "
340- $sudo_pip \
341- http_proxy=${http_proxy:- } \
342- https_proxy=${https_proxy:- } \
343- no_proxy=${no_proxy:- } \
344- PIP_FIND_LINKS=$PIP_FIND_LINKS \
345- $cmd_pip $upgrade \
346- -r $test_req
347- result=$?
348- fi
349-
350344 time_stop " pip_install"
351345 return $result
352346}
You can’t perform that action at this time.
0 commit comments