From 474a430866269caad4b6fcc9dd759aa864d62de6 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 13 Oct 2017 09:46:47 +0300 Subject: [PATCH] Fix permanent problem with sphere.py test: it requires MG-Tetra plugin, which may be unavailable --- tests/sphere.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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) -- 2.39.2