Esempio n. 1
0
def test_frontend_starts_stops_backend():
    configure_test_logger()
    frontend = Frontend([MyListener()])
    connection = frontend.get_connection('../scripts/localfile.mydsl')

    started = datetime.datetime.now()
    cycles = 0
    while connection.state is not State.Disconnected:
        connection.run(datetime.timedelta(seconds=0.1))
        cycles += 1
    ended = datetime.datetime.now()

    _logger.info('Frontend executed %d cycles in %.2f seconds.' % (cycles, (ended - started).total_seconds()))
Esempio n. 2
0
def setup_function(function):
    configure_test_logger()
Esempio n. 3
0
def setup_function(function):
    configure_test_logger()
    # make sure all test function start from input folder:
    os.chdir(os.path.join(os.path.dirname(__file__), 'input'))
Esempio n. 4
0
def setup_function(function):
    configure_test_logger()
    # make sure all test function start from input folder:
    os.chdir(os.path.join(os.path.dirname(__file__), "input"))
Esempio n. 5
0
def setup_function(function):
    configure_test_logger()