From: azv Date: Fri, 1 Oct 2021 11:12:11 +0000 (+0300) Subject: Issue #24412: TestImportImage_1.py TestImportImage_2.py failing X-Git-Tag: V9_8_0a1~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5c6d61f141a4316bea49bdeb6cdff5b6ea11a0f0;p=modules%2Fshaper.git Issue #24412: TestImportImage_1.py TestImportImage_2.py failing Use another approach to get the full path for the test case. --- diff --git a/src/ExchangePlugin/Test/TestImportImage_1.py b/src/ExchangePlugin/Test/TestImportImage_1.py index 2c974d6bf..12c575ef5 100755 --- a/src/ExchangePlugin/Test/TestImportImage_1.py +++ b/src/ExchangePlugin/Test/TestImportImage_1.py @@ -17,13 +17,13 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -import os +import os, inspect from salome.shaper import model import salome salome.salome_init(1) -data_dir = os.path.join(os.path.dirname(sys.argv[0]), "data") +data_dir = os.path.join(os.path.dirname(inspect.getfile(lambda: None)), "data") model.begin() partSet = model.moduleDocument() diff --git a/src/ExchangePlugin/Test/TestImportImage_2.py b/src/ExchangePlugin/Test/TestImportImage_2.py index 025bd9267..29d72c33c 100755 --- a/src/ExchangePlugin/Test/TestImportImage_2.py +++ b/src/ExchangePlugin/Test/TestImportImage_2.py @@ -17,13 +17,13 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -import os +import os, inspect from salome.shaper import model import salome salome.salome_init(1) -data_dir = os.path.join(os.path.dirname(sys.argv[0]), "data") +data_dir = os.path.join(os.path.dirname(inspect.getfile(lambda: None)), "data") from tempfile import TemporaryDirectory tmp_dir = TemporaryDirectory()