Beispiel #1
0
#==============================================================================
#   IMPORTS
#==============================================================================

import os
import sys
import math
import numpy

import matplotlib.pyplot as plt

from lib.utils.ceasiomlogger import get_logger
from lib.utils.cpacsfunctions import open_tixi, close_tixi
from lib.utils.mathfunctions import euler2fix, fix2euler

log = get_logger(__file__.split('.')[0])


#==============================================================================
#   CLASSES
#==============================================================================

# TODO Move this class in a global moudule callable from every where???
class SimpleNamespace(object):
    """ Rudimentary SimpleNamespace clone.

    Works as a record-type object, or 'struct'. Attributes can be added
    on-the-fly by assignment. Attributes are accesed using point-notation.

    https://docs.python.org/3.5/library/types.html
    """
#   IMPORTS
#==============================================================================

import os
import sys
import unittest

from lib.utils.ceasiomlogger import get_logger

# Delete the log file if exist, to simplify the test
if os.path.exists('testlogger.log'):
    os.remove('testlogger.log')

# Set logger name and create a logger with this name
logger_name = __file__.split('.')[0]
log = get_logger(logger_name)
logger_file_name = logger_name + '.log'

#==============================================================================
#   CLASSES
#==============================================================================


class LoggerTest(unittest.TestCase):
    """
    Description of the class

    ATTRIBUTES
    (interger)      arg1            -- Argument 1 [unit]
    (float)         arg2            -- Argument 2 [unit]