From 4de523ee6a3004607278aefc04be853d02dd861e Mon Sep 17 00:00:00 2001 From: Romain Cledat Date: Tue, 10 Sep 2024 15:38:01 -0700 Subject: [PATCH] Re-add test compatibility for 3.5 and 3.6 --- test/core/run_tests.py | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/test/core/run_tests.py b/test/core/run_tests.py index dd6231846b..387b38ac27 100644 --- a/test/core/run_tests.py +++ b/test/core/run_tests.py @@ -206,7 +206,13 @@ def construct_arg_dicts_from_click_api(): else: cmd = context["pre_command"]["command"] called_processes.append( - subprocess.run(cmd, env=env, capture_output=True, check=False) + subprocess.run( + cmd, + env=env, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + check=False, + ) ) if called_processes[-1].returncode and not context["pre_command"].get( "ignore_errors", False @@ -220,7 +226,11 @@ def construct_arg_dicts_from_click_api(): if executor == "cli": called_processes.append( subprocess.run( - run_cmd("run"), env=env, capture_output=True, check=False + run_cmd("run"), + env=env, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + check=False, ) ) elif executor == "api": @@ -259,7 +269,8 @@ def construct_arg_dicts_from_click_api(): ), ), env=env, - capture_output=True, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, check=False, ) ) @@ -305,7 +316,13 @@ def construct_arg_dicts_from_click_api(): cmd = [python, "check_flow.py", check["class"], run_id] cmd.extend(context["top_options"]) called_processes.append( - subprocess.run(cmd, env=env, capture_output=True, check=False) + subprocess.run( + cmd, + env=env, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + check=False, + ) ) if called_processes[-1].returncode: log(