Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions tests/QARegressionTests/test_core/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import subprocess
from platform import system
from os import listdir, remove
from os import environ, listdir, remove


def run_command(args, shell):
env = environ.copy()
env["PYTHONUNBUFFERED"] = "1"
env["PYTHONUTF8"] = "1"

try:
completed_process = subprocess.run(
args,
Expand All @@ -12,9 +16,8 @@ def run_command(args, shell):
universal_newlines=True,
check=True,
encoding="utf8",
# test_test_command and windows seem to be happy with shell=True
# test_validate on linux needs shell=False
shell=shell or system() == "Windows",
env=env,
)
return (
completed_process.returncode,
Expand Down
Loading