Skip to content

Commit

Permalink
tests: Use current python interpreter for sub tests
Browse files Browse the repository at this point in the history
Can be useful to run tests using distro runtimes,
(like python3 on Debian).

Relate-to: theupdateframework#263
Origin: https://salsa.debian.org/rzr/python-tuf/-/tree/debian/review/master
Forwarded: theupdateframework#1337
Signed-off-by: Philippe Coval <[email protected]>
  • Loading branch information
rzr committed Apr 8, 2021
1 parent cd39bff commit baf3aad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import errno
import logging
import socket
import sys
import time
import subprocess
import threading
Expand Down Expand Up @@ -186,7 +187,7 @@ def _start_process(self, extra_cmd_args, popen_cwd):
"""Starts the process running the server."""

# The "-u" option forces stdin, stdout and stderr to be unbuffered.
command = ['python', '-u', self.server] + extra_cmd_args
command = [sys.executable, '-u', self.server] + extra_cmd_args

# Reusing one subprocess in multiple tests, but split up the logs for each.
self.__server_process = subprocess.Popen(command,
Expand Down

0 comments on commit baf3aad

Please sign in to comment.