smesh/test/blocFissure_01_without_session.py

46 lines
998 B
Python
Raw Normal View History

#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests de blocFissure ; en standalone
2021-04-26 21:31:20 +05:00
Cas tests basés sur les matériels :
. cubeAngle
. cubeFin
Copyright 2021 EDF
Gérald NICOLAS
+33.1.78.19.43.52
"""
__revision__ = "V02.04"
import os
import sys
# Lancement des cas-tests
import salome
salome.standalone()
salome.salome_init_without_session()
2021-04-26 21:31:20 +05:00
from blocFissure.CasTests.blocFissureTest import blocFissureTest
BLOCFISSURE_TEST = blocFissureTest(["cubeAngle", "cubeAngle_2","cubeCoin", "cubeMilieu", "cubeTransverse"])
2021-04-26 21:31:20 +05:00
MESSAGE_ERREUR = BLOCFISSURE_TEST.lancement()
#sys.stdout.write(MESSAGE_ERREUR)
2021-04-26 14:12:52 +05:00
del BLOCFISSURE_TEST
# Diagnostic
2021-04-26 21:31:20 +05:00
if MESSAGE_ERREUR:
if ( "NOOK" in MESSAGE_ERREUR ):
LAUX = MESSAGE_ERREUR.split()
ERREUR = int(LAUX[LAUX.index("NOOK")+2])
else:
ERREUR = 0
else:
2021-04-26 14:12:52 +05:00
MESSAGE_ERREUR = "Impossible de trouver le diagnostic de la procédure de tests."
ERREUR = -1
if ERREUR:
sys.stderr.write(MESSAGE_ERREUR)
#raise Exception(MESSAGE_ERREUR)
assert(False)
2021-04-26 21:31:20 +05:00