From a832fa839735bc0bcca88384081360be5ea3ca93 Mon Sep 17 00:00:00 2001 From: Samuel Johnson Date: Wed, 3 Jun 2026 15:28:39 -0400 Subject: [PATCH] update test_utils --- tests/QARegressionTests/test_core/test_utils.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/QARegressionTests/test_core/test_utils.py b/tests/QARegressionTests/test_core/test_utils.py index 89f9fabd6..7a1f7c65b 100644 --- a/tests/QARegressionTests/test_core/test_utils.py +++ b/tests/QARegressionTests/test_core/test_utils.py @@ -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, @@ -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,