From 0683f65332adfe482a1b3f4dff835902661e8471 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=A9rald=20NICOLAS?= Date: Mon, 15 Feb 2021 16:09:48 +0100 Subject: [PATCH] Test de MGAdapt en standalone --- doc/salome/examples/MGAdaptTests.py | 15 +++++++++++---- doc/salome/examples/tests.set | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/doc/salome/examples/MGAdaptTests.py b/doc/salome/examples/MGAdaptTests.py index e549db9f5..f41ac4c04 100755 --- a/doc/salome/examples/MGAdaptTests.py +++ b/doc/salome/examples/MGAdaptTests.py @@ -1,21 +1,27 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -"""Tests des adaptations par MGAdapt en TUI +"""Tests des adaptations par MGAdapt en standalone Copyright 2021 EDF Gérald NICOLAS +33.1.78.19.43.52 """ -__revision__ = "V04.01" +__revision__ = "V04.02" #========================= Les imports - Début =================================== -import os import sys - import salome +import os +salome.standalone() +salome.salome_init() + +l=list(os.environ.keys()) +l.sort() +print (l) + import SMESH from salome.smesh import smeshBuilder smesh = smeshBuilder.New() @@ -462,6 +468,7 @@ if __name__ == "__main__" : sys.stdout.write(MGADAPT_TEST.__doc__+"\n") MESSAGE_ERREUR += "\n {} erreur(s)\n".format(ERREUR) sys.stderr.write(MESSAGE_ERREUR) + raise Exception(MESSAGE_ERREUR) assert(False) del MGADAPT_TEST diff --git a/doc/salome/examples/tests.set b/doc/salome/examples/tests.set index 9b8382560..5a9894f00 100644 --- a/doc/salome/examples/tests.set +++ b/doc/salome/examples/tests.set @@ -183,12 +183,12 @@ SET(GOOD_TESTS quad_medial_axis_algo.py defining_hypotheses_len_near_vertex.py test_polyhedron_per_solid.py - MGAdaptTests.py ) set(SESSION_FREE_TESTS basic_geom_smesh_without_session.py basic_shaper_smesh_without_session.py + MGAdaptTests.py ) SET(EXAMPLES_TESTS ${BAD_TESTS} ${GOOD_TESTS} ${SESSION_FREE_TESTS} testme.py) -- 2.39.2