From: vsr Date: Mon, 8 Nov 2021 16:39:35 +0000 (+0300) Subject: bos #26609 Patching tests (Windows) X-Git-Tag: V9_8_0rc1~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8cdb1289cf97c48e8fbdc597dd55d6e536768cea;p=modules%2Fshaper.git bos #26609 Patching tests (Windows) --- diff --git a/src/ExchangePlugin/Test/TestImportImage_1.py b/src/ExchangePlugin/Test/TestImportImage_1.py index 1c529e196..1fcc4645b 100755 --- a/src/ExchangePlugin/Test/TestImportImage_1.py +++ b/src/ExchangePlugin/Test/TestImportImage_1.py @@ -99,6 +99,7 @@ assert(abs(dz-0) <= tol) # Close SALOME GUI import salome_utils -import subprocess +import killSalomeWithPort + port = salome_utils.getPortNumber() -proc = subprocess.Popen(["killSalomeWithPort.py", "{}".format(port)]) +killSalomeWithPort.killMyPort(port) diff --git a/src/ExchangePlugin/Test/TestImportImage_2.py b/src/ExchangePlugin/Test/TestImportImage_2.py index 94b328fb3..7f26b06b2 100755 --- a/src/ExchangePlugin/Test/TestImportImage_2.py +++ b/src/ExchangePlugin/Test/TestImportImage_2.py @@ -105,6 +105,7 @@ assert(abs(dz-0) <= tol) # Close SALOME GUI import salome_utils -import subprocess +import killSalomeWithPort + port = salome_utils.getPortNumber() -proc = subprocess.Popen(["killSalomeWithPort.py", "{}".format(port)]) +killSalomeWithPort.killMyPort(port) diff --git a/src/ExchangePlugin/Test/testme.py b/src/ExchangePlugin/Test/testme.py index 94e8622d6..99f241f65 100755 --- a/src/ExchangePlugin/Test/testme.py +++ b/src/ExchangePlugin/Test/testme.py @@ -62,7 +62,8 @@ class SalomeSession(object): def __del__(self): port = os.getenv('NSPORT') import killSalomeWithPort - killSalomeWithPort.killMyPort(port) + if port: + killSalomeWithPort.killMyPort(port) return pass