From 95907aba8d15d5bdcbf8e5cba3e1f0fb829d3757 Mon Sep 17 00:00:00 2001 From: Eran Date: Sat, 9 Jan 2021 13:14:06 +0200 Subject: [PATCH] python subprocess invocation using same python exe --- unit-tests/run-unit-tests.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/unit-tests/run-unit-tests.py b/unit-tests/run-unit-tests.py index 209956cfd9..14ac65a797 100644 --- a/unit-tests/run-unit-tests.py +++ b/unit-tests/run-unit-tests.py @@ -175,10 +175,7 @@ def find( dir, mask ): for py_test in find(current_dir, target): n_tests += 1 progress( py_test + ' ...' ) - if linux: - cmd = ["python3"] - else: - cmd = ["py", "-3"] + cmd = [sys.executable] if sys.flags.verbose: cmd += ["-v"] cmd += [current_dir + os.sep + py_test] @@ -319,10 +316,7 @@ def check_log_for_fails(log, testname, exe): progress( testname, '>', log, '...' ) n_tests += 1 test_path = current_dir + os.sep + py_test - if linux: - cmd = ["python3", test_path] - else: - cmd = ["py","-3", test_path] + cmd = [sys.executable, test_path] try: run( cmd, stdout=log ) except FileNotFoundError: