]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
bos #24412 Fix tests for 'salome test' mode
authorvsr <vsr@opencascade.com>
Thu, 7 Oct 2021 12:22:24 +0000 (15:22 +0300)
committervsr <vsr@opencascade.com>
Thu, 7 Oct 2021 12:22:24 +0000 (15:22 +0300)
src/ExchangePlugin/Test/TestImportImage_1.py
src/ExchangePlugin/Test/TestImportImage_2.py

index 12c575ef59312fa398207186e8c2435e99b4fb32..1c529e1963b575278c5d64d7b8a00703904e369d 100755 (executable)
 import os, inspect
 from salome.shaper import model
 
+from PyQt5.Qt import QApplication
+
 import salome
+salome.salome_init_without_session()
 salome.salome_init(1)
+if QApplication.instance() is None:
+  app = QApplication([])
 
 data_dir = os.path.join(os.path.dirname(inspect.getfile(lambda: None)), "data")
 
index 29d72c33cf37fc90a042211ed7bbaf0f7894d297..94b328fb3a5cf87f5ad01f4645bb7bbc6ac70e37 100755 (executable)
 import os, inspect
 from salome.shaper import model
 
+from PyQt5.Qt import QApplication
+
 import salome
+salome.salome_init_without_session()
 salome.salome_init(1)
+if QApplication.instance() is None:
+  app = QApplication([])
 
 data_dir = os.path.join(os.path.dirname(inspect.getfile(lambda: None)), "data")