From 3055df08880d64e07d1fb3e3b59e03d3c1d0ee28 Mon Sep 17 00:00:00 2001 From: Gerald NICOLAS Date: Wed, 10 Jan 2018 11:16:40 +0100 Subject: [PATCH] distinction test/tutorial --- src/tests/Test/test_1.py | 4 ++-- src/tests/Test/test_2.py | 4 ++-- src/tests/Test/test_3.py | 4 ++-- src/tests/Test/test_4.py | 4 ++-- src/tests/Test/test_5.py | 4 ++-- src/tests/Test/test_6.py | 5 +++-- src/tests/Test/test_util.py | 15 ++++++++++++--- src/tests/Test/tutorial_1.py | 6 ++++-- src/tests/Test/tutorial_2.py | 6 ++++-- src/tests/Test/tutorial_3.py | 6 ++++-- src/tests/Test/tutorial_4.py | 6 ++++-- src/tests/Test/tutorial_5.py | 6 ++++-- src/tests/Test/tutorial_6.py | 6 ++++-- 13 files changed, 49 insertions(+), 27 deletions(-) diff --git a/src/tests/Test/test_1.py b/src/tests/Test/test_1.py index 35a0648d..cbc2a598 100755 --- a/src/tests/Test/test_1.py +++ b/src/tests/Test/test_1.py @@ -21,7 +21,7 @@ Python script for HOMARD Test test_1 """ -__revision__ = "V4.02" +__revision__ = "V4.03" #======================================================================== TEST_NAME = "test_1" @@ -43,7 +43,7 @@ from test_util import get_dir from test_util import test_results # ================================== # Répertoires pour ce test -REP_DATA, DIRCASE, DATA_TUTORIAL = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) +REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) # ================================== salome.salome_init() diff --git a/src/tests/Test/test_2.py b/src/tests/Test/test_2.py index b82a862d..80c2d02b 100755 --- a/src/tests/Test/test_2.py +++ b/src/tests/Test/test_2.py @@ -21,7 +21,7 @@ Python script for HOMARD Test test_2 """ -__revision__ = "V4.02" +__revision__ = "V4.03" #======================================================================== TEST_NAME = "test_2" @@ -43,7 +43,7 @@ from test_util import get_dir from test_util import test_results # ================================== # Répertoires pour ce test -REP_DATA, DIRCASE, DATA_TUTORIAL = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) +REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) # ================================== salome.salome_init() diff --git a/src/tests/Test/test_3.py b/src/tests/Test/test_3.py index 21c021bd..92525f35 100755 --- a/src/tests/Test/test_3.py +++ b/src/tests/Test/test_3.py @@ -21,7 +21,7 @@ Python script for HOMARD Test test_3 """ -__revision__ = "V4.03" +__revision__ = "V4.04" #======================================================================== TEST_NAME = "test_3" @@ -44,7 +44,7 @@ from test_util import get_dir from test_util import test_results # ================================== # Répertoires pour ce test -REP_DATA, DIRCASE, DATA_TUTORIAL = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) +REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) # ================================== salome.salome_init() diff --git a/src/tests/Test/test_4.py b/src/tests/Test/test_4.py index 485a29a5..8d6306bc 100755 --- a/src/tests/Test/test_4.py +++ b/src/tests/Test/test_4.py @@ -21,7 +21,7 @@ Python script for HOMARD Test test_4 """ -__revision__ = "V3.02" +__revision__ = "V3.03" #======================================================================== TEST_NAME = "test_4" @@ -51,7 +51,7 @@ from test_util import get_dir from test_util import test_results # ================================== # Répertoires pour ce test -REP_DATA, DIRCASE, DATA_TUTORIAL = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) +REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) # ================================== salome.salome_init() diff --git a/src/tests/Test/test_5.py b/src/tests/Test/test_5.py index a7b4b9f8..84bde230 100755 --- a/src/tests/Test/test_5.py +++ b/src/tests/Test/test_5.py @@ -22,7 +22,7 @@ Python script for HOMARD Specific conditions for Code_Saturne Test test_5 """ -__revision__ = "V2.02" +__revision__ = "V2.03" #======================================================================== TEST_NAME = "test_5" @@ -55,7 +55,7 @@ from test_util import get_dir from test_util import test_results # ================================== # Répertoires pour ce test -REP_DATA, DIRCASE, DATA_TUTORIAL = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) +REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) # ================================== salome.salome_init() diff --git a/src/tests/Test/test_6.py b/src/tests/Test/test_6.py index 0182563b..a64379b9 100755 --- a/src/tests/Test/test_6.py +++ b/src/tests/Test/test_6.py @@ -21,7 +21,7 @@ Python script for HOMARD Test test_6 """ -__revision__ = "V1.03" +__revision__ = "V1.04" #======================================================================== TEST_NAME = "test_6" @@ -47,7 +47,8 @@ from test_util import get_dir from test_util import test_results # ================================== # Répertoires pour ce test -REP_DATA, DIRCASE, DATA_TUTORIAL = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) +REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) +# ================================== salome.salome_init() import iparameters diff --git a/src/tests/Test/test_util.py b/src/tests/Test/test_util.py index c33f98ea..960c0e8d 100755 --- a/src/tests/Test/test_util.py +++ b/src/tests/Test/test_util.py @@ -21,7 +21,7 @@ Python script for HOMARD Utilitaires pour les tests """ -__revision__ = "V4.01" +__revision__ = "V4.02" import os import tempfile @@ -47,13 +47,22 @@ Copyright EDF 2018 os.mkdir(dircase) else : dircase = tempfile.mkdtemp(prefix=test_name) +# + return rep_data, dircase +# +#======================================================================== +#======================================================================== +def get_dir_tutorial(path_homard) : + """ +Get directory for the tutorial. +Copyright EDF 2018 + """ # # Répertoire des données du tutorial data_tutorial = os.path.join(path_homard, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads") data_tutorial = os.path.normpath(data_tutorial) # - return rep_data, dircase, data_tutorial -# + return data_tutorial #======================================================================== #======================================================================== def remove_dir(directory) : diff --git a/src/tests/Test/tutorial_1.py b/src/tests/Test/tutorial_1.py index 25fd3499..2cf3337c 100755 --- a/src/tests/Test/tutorial_1.py +++ b/src/tests/Test/tutorial_1.py @@ -21,7 +21,7 @@ Python script for HOMARD Test tutorial_1 associe au tutorial 1 """ -__revision__ = "V4.03" +__revision__ = "V4.04" #======================================================================== TEST_NAME = "tutorial_1" @@ -40,10 +40,12 @@ REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD") REP_PYTHON = os.path.normpath(REP_PYTHON) sys.path.append(REP_PYTHON) from test_util import get_dir +from test_util import get_dir_tutorial from test_util import test_results # ================================== # Répertoires pour ce test -REP_DATA, DIRCASE, DATA_TUTORIAL = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) +REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) +DATA_TUTORIAL = get_dir_tutorial(PATH_HOMARD) # ================================== sys.path.append(DATA_TUTORIAL) from tutorial_util import gzip_gunzip diff --git a/src/tests/Test/tutorial_2.py b/src/tests/Test/tutorial_2.py index fa1c3d98..29595c1a 100755 --- a/src/tests/Test/tutorial_2.py +++ b/src/tests/Test/tutorial_2.py @@ -21,7 +21,7 @@ Python script for HOMARD Test tutorial_2 associe au tutorial 2 """ -__revision__ = "V4.03" +__revision__ = "V4.04" #======================================================================== TEST_NAME = "tutorial_2" @@ -40,10 +40,12 @@ REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD") REP_PYTHON = os.path.normpath(REP_PYTHON) sys.path.append(REP_PYTHON) from test_util import get_dir +from test_util import get_dir_tutorial from test_util import test_results # ================================== # Répertoires pour ce test -REP_DATA, DIRCASE, DATA_TUTORIAL = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) +REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) +DATA_TUTORIAL = get_dir_tutorial(PATH_HOMARD) # ================================== sys.path.append(DATA_TUTORIAL) from tutorial_util import gzip_gunzip diff --git a/src/tests/Test/tutorial_3.py b/src/tests/Test/tutorial_3.py index c207e277..7b7dfaa3 100755 --- a/src/tests/Test/tutorial_3.py +++ b/src/tests/Test/tutorial_3.py @@ -21,7 +21,7 @@ Python script for HOMARD Test tutorial_3 associe au tutorial 3 """ -__revision__ = "V4.03" +__revision__ = "V4.04" #======================================================================== TEST_NAME = "tutorial_3" @@ -40,10 +40,12 @@ REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD") REP_PYTHON = os.path.normpath(REP_PYTHON) sys.path.append(REP_PYTHON) from test_util import get_dir +from test_util import get_dir_tutorial from test_util import test_results # ================================== # Répertoires pour ce test -REP_DATA, DIRCASE, DATA_TUTORIAL = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) +REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) +DATA_TUTORIAL = get_dir_tutorial(PATH_HOMARD) # ================================== sys.path.append(DATA_TUTORIAL) from tutorial_util import gzip_gunzip diff --git a/src/tests/Test/tutorial_4.py b/src/tests/Test/tutorial_4.py index 2bbdaf9a..157c7712 100755 --- a/src/tests/Test/tutorial_4.py +++ b/src/tests/Test/tutorial_4.py @@ -21,7 +21,7 @@ Python script for HOMARD Test tutorial_4 associe au tutorial 4 """ -__revision__ = "V5.02" +__revision__ = "V5.03" #======================================================================== TEST_NAME = "tutorial_4" @@ -40,10 +40,12 @@ REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD") REP_PYTHON = os.path.normpath(REP_PYTHON) sys.path.append(REP_PYTHON) from test_util import get_dir +from test_util import get_dir_tutorial from test_util import test_results # ================================== # Répertoires pour ce test -REP_DATA, DIRCASE, DATA_TUTORIAL = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) +REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) +DATA_TUTORIAL = get_dir_tutorial(PATH_HOMARD) # ================================== sys.path.append(DATA_TUTORIAL) from tutorial_util import gzip_gunzip diff --git a/src/tests/Test/tutorial_5.py b/src/tests/Test/tutorial_5.py index 1cb675e8..26f4fde5 100755 --- a/src/tests/Test/tutorial_5.py +++ b/src/tests/Test/tutorial_5.py @@ -21,7 +21,7 @@ Python script for HOMARD Test tutorial_5 associe au tutorial 5 """ -__revision__ = "V4.03" +__revision__ = "V4.04" #======================================================================== TEST_NAME = "tutorial_5" @@ -40,10 +40,12 @@ REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD") REP_PYTHON = os.path.normpath(REP_PYTHON) sys.path.append(REP_PYTHON) from test_util import get_dir +from test_util import get_dir_tutorial from test_util import test_results # ================================== # Répertoires pour ce test -REP_DATA, DIRCASE, DATA_TUTORIAL = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) +REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) +DATA_TUTORIAL = get_dir_tutorial(PATH_HOMARD) # ================================== sys.path.append(DATA_TUTORIAL) from tutorial_util import gzip_gunzip diff --git a/src/tests/Test/tutorial_6.py b/src/tests/Test/tutorial_6.py index b62473cd..2b97e81b 100755 --- a/src/tests/Test/tutorial_6.py +++ b/src/tests/Test/tutorial_6.py @@ -21,7 +21,7 @@ Python script for HOMARD Test tutorial_6 associe au tutorial 6 """ -__revision__ = "V4.03" +__revision__ = "V4.04" #======================================================================== TEST_NAME = "tutorial_6" @@ -40,10 +40,12 @@ REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD") REP_PYTHON = os.path.normpath(REP_PYTHON) sys.path.append(REP_PYTHON) from test_util import get_dir +from test_util import get_dir_tutorial from test_util import test_results # ================================== # Répertoires pour ce test -REP_DATA, DIRCASE, DATA_TUTORIAL = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) +REP_DATA, DIRCASE = get_dir(PATH_HOMARD, TEST_NAME, DEBUG) +DATA_TUTORIAL = get_dir_tutorial(PATH_HOMARD) # ================================== sys.path.append(DATA_TUTORIAL) from tutorial_util import gzip_gunzip -- 2.39.2