From: vsr Date: Fri, 13 Oct 2017 06:46:47 +0000 (+0300) Subject: Fix permanent problem with sphere.py test: it requires MG-Tetra plugin, which may... X-Git-Tag: V8_4_0rc3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ef82fb002644b8a17091b098ad43c3034fc496f6;p=plugins%2Fblsurfplugin.git Fix permanent problem with sphere.py test: it requires MG-Tetra plugin, which may be unavailable --- diff --git a/tests/sphere.py b/tests/sphere.py index bea9381..ac4b96d 100644 --- a/tests/sphere.py +++ b/tests/sphere.py @@ -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)