From 6bc96ebc5f57390452b76236382f61e75d51ee05 Mon Sep 17 00:00:00 2001 From: jfa Date: Mon, 10 Jan 2022 18:02:10 +0300 Subject: [PATCH] Fix running tests with salome test --- doc/salome/examples/test_homard_adapt.py | 4 ++-- doc/salome/examples/test_uniform_refinement.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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") -- 2.39.2