]> SALOME platform Git repositories - plugins/blsurfplugin.git/commitdiff
Salome HOME
Fix permanent problem with sphere.py test: it requires MG-Tetra plugin, which may... V8_4_BR V8_4_0 V8_4_0rc1 V8_4_0rc2 V8_4_0rc3 V8_4_0rc4
authorvsr <vsr@opencascade.com>
Fri, 13 Oct 2017 06:46:47 +0000 (09:46 +0300)
committervsr <vsr@opencascade.com>
Fri, 13 Oct 2017 06:46:47 +0000 (09:46 +0300)
tests/sphere.py

index bea9381625675c00cc70b3c534a60c430d475a7c..ac4b96d9a67230bd824ce39934bf6bf23a926c75 100644 (file)
@@ -42,12 +42,15 @@ ok = Mesh_1.Compute()
 if not ok:
     raise Exception("Error when computing surface mesh")
 
-Mesh_1.Tetrahedron(algo=smeshBuilder.MG_Tetra)
+try:
+    Mesh_1.Tetrahedron(algo=smeshBuilder.MG_Tetra)
 
-ok = Mesh_1.Compute()
+    ok = Mesh_1.Compute()
 
-if not ok:
-    raise Exception("Error when computing volume mesh")
+    if not ok:
+        raise Exception("Error when computing volume mesh")
+except AttributeError:
+    print "Warning: Cannot build volume mesh: MG-Tetra plugin seems to be unavailable"
 
 if salome.sg.hasDesktop():
   salome.sg.updateObjBrowser(True)