Skip to content

Commit

Permalink
Revert some subprocess.check_output
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Dec 24, 2024
1 parent 9676aa9 commit 1c491f7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion stubs/gevent/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ gevent.socket.wait_write
# we have punted on ssl, the gevent version of these functions have an additional
# argument for timeouts/blocking and there are some with different default values
# for nbytes/length, for now we ignore that fact
gevent.ssl.Purpose.__new__
gevent.ssl.SSLSocket.__init__
gevent.ssl.SSLSocket.do_handshake
gevent.ssl.SSLSocket.read
Expand Down
4 changes: 3 additions & 1 deletion tests/regr_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ def setup_testcase_dir(package: DistributionTests, tempdir: Path, verbosity: Ver
if verbosity is Verbosity.VERBOSE:
verbose_log(f"{package.name}: Setting up venv in {venv_location}. {uv_command=}\n")
try:
subprocess.check_output(uv_command, text=True, env=os.environ | {"VIRTUAL_ENV": venv_location})
subprocess.run(
uv_command, check=True, capture_output=True, text=True, env=os.environ | {"VIRTUAL_ENV": venv_location}
)
except subprocess.CalledProcessError as e:
_PRINT_QUEUE.put(f"{package.name}\n{e.stderr}")
raise
Expand Down
6 changes: 3 additions & 3 deletions tests/stubtest_third_party.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def run_stubtest(
venv_dir = Path(tmp)
try:
try:
subprocess.check_output(["uv", "venv", venv_dir, "--seed"])
subprocess.run(["uv", "venv", venv_dir, "--seed"], capture_output=True, check=True)
except subprocess.CalledProcessError as e:
print_command_failure("Failed to create a virtualenv (likely a bug in uv?)", e)
return False
Expand Down Expand Up @@ -93,7 +93,7 @@ def run_stubtest(

pip_cmd = [pip_exe, "install", *dists_to_install]
try:
subprocess.check_output(pip_cmd)
subprocess.run(pip_cmd, check=True, capture_output=True)
except subprocess.CalledProcessError as e:
print_command_failure("Failed to install", e)
return False
Expand Down Expand Up @@ -133,7 +133,7 @@ def run_stubtest(
return False

try:
subprocess.check_output(stubtest_cmd, env=stubtest_env)
subprocess.run(stubtest_cmd, env=stubtest_env, check=True, capture_output=True)
except subprocess.CalledProcessError as e:
print_error("fail")

Expand Down

0 comments on commit 1c491f7

Please sign in to comment.