From 583d9bf70c99ff6a743b54da548a438f7344ecfe Mon Sep 17 00:00:00 2001 From: mbs Date: Thu, 28 Mar 2024 19:45:57 +0000 Subject: [PATCH] need to explicitly call python script in sub process with 'python script.py' on Windows --- src/ExchangePlugin/Test/TestImportImage_3.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ExchangePlugin/Test/TestImportImage_3.py b/src/ExchangePlugin/Test/TestImportImage_3.py index 82b1a8974..4de0cf850 100755 --- a/src/ExchangePlugin/Test/TestImportImage_3.py +++ b/src/ExchangePlugin/Test/TestImportImage_3.py @@ -104,5 +104,9 @@ with TemporaryDirectory() as tmp_dir: # Close SALOME GUI import salome_utils import subprocess +import platform port = salome_utils.getPortNumber() -proc = subprocess.Popen(["killSalomeWithPort.py", "{}".format(port)]) +if platform.system() == "Windows": + proc = subprocess.Popen(["python", "killSalomeWithPort.py", "{}".format(port)]) +else: + proc = subprocess.Popen(["killSalomeWithPort.py", "{}".format(port)]) -- 2.39.2