Skip to content

Commit

Permalink
Fix python tests in 2.7 by converting pip option to an env var
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentGoderre committed Oct 23, 2023
1 parent 69e253d commit 44b79e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/tests/python-pip-requests-ssl/container.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import subprocess, sys
subprocess.check_call([sys.executable, '-m', 'pip', 'install', '--root-user-action', 'ignore', 'requests'])
subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'ignore', 'requests'])

import requests
r = requests.get('https://google.com')
Expand Down
2 changes: 2 additions & 0 deletions test/tests/run-python-in-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ case "$1" in
source "$runDir/run-in-container.sh" \
--docker-arg --env=PIP_DISABLE_PIP_VERSION_CHECK=1 \
--docker-arg --env=PIP_NO_PYTHON_VERSION_WARNING=1 \
--docker-arg --env=PIP_ROOT_USER_ACTION=ignore \
"$testDir" "$1" "$python" container.py
;;

Expand All @@ -34,6 +35,7 @@ case "$1" in
source "$runDir/run-in-container.sh" \
--docker-arg --env=PIP_DISABLE_PIP_VERSION_CHECK=1 \
--docker-arg --env=PIP_NO_PYTHON_VERSION_WARNING=1 \
--docker-arg --env=PIP_ROOT_USER_ACTION=ignore \
"$testDir" "$1" sh -ec '
for c in pypy3 pypy python3 python; do
if [ -x "/usr/local/bin/$c" ]; then
Expand Down

0 comments on commit 44b79e2

Please sign in to comment.