-# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2011-2014 CEA/DEN, EDF R&D
+# -*- coding: utf-8 -*-
+# Copyright (C) 2011-2015 CEA/DEN, EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
"""
Python script for HOMARD
-Copyright EDF-R&D 2010, 2014
Test test_11 associe au tutorial 1
"""
-__revision__ = "V2.1"
+__revision__ = "V2.3"
#========================================================================
Test_Name = "test_11"
+debug=False
n_iter_test_file = 3
#========================================================================
import os
Rep_Test = os.path.join(pathHomard, "share", "salome", "resources", "homard")
Rep_Test = os.path.normpath(Rep_Test)
sys.path.append(Rep_Test)
+from test_util import remove_dir
from test_util import test_results
# Repertoire des resultats
-dircase = tempfile.mktemp()
-os.mkdir(dircase)
+if debug :
+ dircase = os.path.join("/tmp", Test_Name)
+ if ( os.path.isdir(dircase) ) :
+ remove_dir(dircase)
+ os.mkdir(dircase)
+else :
+ dircase = tempfile.mkdtemp()
# Repertoire des donnees du tutorial
data_dir = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
data_dir = os.path.normpath(data_dir)
# ===
Case_1 = homard.CreateCase('Case_1', 'MAILL', data_dir+'/tutorial_1.00.med')
Case_1.SetDirName(dircase)
- Case_1.SetConfType(1)
#
# Iterations
# ==========
# Test of the results
#
n_rep_test_file = n_iter_test_file
-test_results(Rep_Test, Test_Name, dircase, n_iter_test_file, n_rep_test_file)
+destroy_dir = not debug
+test_results(Rep_Test, Test_Name, dircase, n_iter_test_file, n_rep_test_file, destroy_dir)
#
# ==================================
gzip_gunzip(data_dir, 1, 1)