From: jfa Date: Mon, 10 Jan 2022 15:02:10 +0000 (+0300) Subject: Fix running tests with salome test X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6bc96ebc5f57390452b76236382f61e75d51ee05;p=modules%2Fsmesh.git Fix running tests with salome test --- diff --git a/doc/salome/examples/test_homard_adapt.py b/doc/salome/examples/test_homard_adapt.py index cedbdd460..030bb6f62 100644 --- a/doc/salome/examples/test_homard_adapt.py +++ b/doc/salome/examples/test_homard_adapt.py @@ -3,7 +3,7 @@ import salome -salome.salome_init() +salome.salome_init_without_session() import SMESH, SALOMEDS from salome.smesh import smeshBuilder @@ -13,7 +13,7 @@ smesh = smeshBuilder.New() import os, inspect, tempfile, shutil -data_dir = os.path.dirname(inspect.getfile(lambda: None)) +data_dir = os.path.abspath(os.path.dirname(inspect.getfile(lambda: None))) working_dir = tempfile.mkdtemp() input_med = os.path.join (data_dir, "test_homard_adapt.med") diff --git a/doc/salome/examples/test_uniform_refinement.py b/doc/salome/examples/test_uniform_refinement.py index 92451c949..d4606bd2e 100644 --- a/doc/salome/examples/test_uniform_refinement.py +++ b/doc/salome/examples/test_uniform_refinement.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import salome -salome.salome_init() +salome.salome_init_without_session() import SMESH, SALOMEDS from salome.smesh import smeshBuilder @@ -11,7 +11,7 @@ smesh = smeshBuilder.New() import os, inspect, tempfile, shutil -data_dir = os.path.dirname(inspect.getfile(lambda: None)) +data_dir = os.path.abspath(os.path.dirname(inspect.getfile(lambda: None))) working_dir = tempfile.mkdtemp() input_med_1 = os.path.join (data_dir, "tutorial_4.00.med")