Salome HOME
Merge Python 3 porting.
[modules/homard.git] / src / tests / Test / test_4.py
index 452d455f16bbaec5d8f4400ca80aae48bc5a02de..eadda0ce20bee7195417fa225f0c581db55f07c1 100755 (executable)
@@ -78,7 +78,7 @@ IPAR.append("AP_MODULES_LIST", "Homard")
 #
 #========================================================================
 #========================================================================
-def geom_smesh_exec(theStudy):
+def geom_smesh_exec():
   """
 Python script for GEOM and SMESH
   """
@@ -86,7 +86,7 @@ Python script for GEOM and SMESH
 #
   while not error :
   #
-    geompy = geomBuilder.New(theStudy)
+    geompy = geomBuilder.New()
   #
   # Creation of the box
   # ===================
@@ -94,7 +94,7 @@ Python script for GEOM and SMESH
 
   # Creation of the mesh
   # ====================
-    smesh = smeshBuilder.New(theStudy)
+    smesh = smeshBuilder.New()
     box_m = smesh.Mesh(box_g)
     smesh.SetName(box_m.GetMesh(), 'MESH')
   #
@@ -139,7 +139,7 @@ Python script for GEOM and SMESH
 #========================================================================
 #
 #========================================================================
-def field_exec(theStudy, niter):
+def field_exec(niter):
   """
 Python script for MEDCoupling
   """
@@ -185,7 +185,7 @@ Python script for MEDCoupling
 
 #========================================================================
 #========================================================================
-def homard_exec(theStudy):
+def homard_exec():
   """
 Python script for HOMARD
   """
@@ -193,7 +193,7 @@ Python script for HOMARD
 #
   while not error :
   #
-    HOMARD.SetCurrentStudy(theStudy)
+    HOMARD.UpdateStudy()
   #
   # Creation of the zones
   # =====================
@@ -290,7 +290,7 @@ Python script for HOMARD
 
   # Creation of the iteration 3
   #
-    error = field_exec(theStudy, 2)
+    error = field_exec(2)
     if error :
       error = 30
       break
@@ -317,7 +317,7 @@ Python script for HOMARD
 # Geometry and Mesh
 #
 try :
-  ERROR = geom_smesh_exec(salome.myStudy)
+  ERROR = geom_smesh_exec()
   if ERROR :
     raise Exception('Pb in geom_smesh_exec')
 except Exception as eee:
@@ -330,7 +330,7 @@ HOMARD.SetLanguageShort("fr")
 # Exec of HOMARD-SALOME
 #
 try :
-  ERROR = homard_exec(salome.myStudy)
+  ERROR = homard_exec()
   if ERROR :
     raise Exception('Pb in homard_exec at iteration %d' %ERROR )
 except Exception as eee:
@@ -343,6 +343,6 @@ DESTROY_DIR = not DEBUG
 test_results(REP_DATA, TEST_NAME, DIRCASE, N_ITER_TEST_FILE, N_REP_TEST_FILE, DESTROY_DIR)
 #
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(True)
+  salome.sg.updateObjBrowser()
   iparameters.getSession().restoreVisualState(1)