Salome HOME
Copyright update 2022
[modules/smesh.git] / src / Tools / blocFissure / CasTests / blocFissureTest.py
old mode 100644 (file)
new mode 100755 (executable)
index 6beab0a..0624df2
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2014-2021  EDF R&D
+# Copyright (C) 2014-2022  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
@@ -47,7 +47,7 @@ from blocFissure.gmu import initLog
 from blocFissure.gmu.casStandard import casStandard
 
 # -----------------------------------------------------------------------------------------------
-LOGFILE = os.path.join(tempfile.gettempdir(),"blocFissure.log")
+LOGFILE = tempfile.NamedTemporaryFile().name + "_blocFissure.log"
 #initLog.setDebug(LOGFILE)     # debug = 10
 #initLog.setVerbose(LOGFILE)   # info = 20
 #initLog.setRelease(LOGFILE)   # warning = 30
@@ -429,7 +429,7 @@ Le(s) numéro/nom du/des tests à passer. Si aucun n'est donné, tous les cas so
     else:
       nom = cas.nomProbleme
     texte_a = "\n=== Exécution du cas n° {}, '{}'".format(NREF_PB[nom],nom)
-    logging.critical(ligne+texte_a)
+    logging.critical((ligne+texte_a).encode('utf-8'))
 
     try:
       ok_maillage = cas.executeProbleme()
@@ -470,8 +470,8 @@ Le(s) numéro/nom du/des tests à passer. Si aucun n'est donné, tous les cas so
         texte += ". Nombre de cas_tests NOOK : {}\n".format(nb_cas_nook)
       else:
         texte += "Les {} tests se sont bien passés.\n".format(nb_cas)
-    print (texte+ligne)
-    logging.critical(ligne+texte)
+    print ((texte+ligne).encode('utf-8'))
+    logging.critical((ligne+texte).encode('utf-8'))
 
     return texte