def process_execution_starting_request(request, clear=True):
    if clear:
        registry.clear()
        load_impls(get_step_impl_dirs())
    execution_info = create_execution_context_from(
        request.currentExecutionInfo)
    response = run_hook(request, registry.before_suite(), execution_info)
    _add_message_and_screenshots(response)
    return response
def _execute_before_suite_hook(request, response, _socket, clear=True):
    if clear:
        registry.clear()
        load_impls(get_step_impl_dir())
    if environ.get('DEBUGGING'):
        ptvsd.enable_attach('',
                            address=('0.0.0.0',
                                     int(environ.get('DEBUG_PORT'))))
        logging.info(ATTACH_DEBUGGER_EVENT)
        ptvsd.wait_for_attach()

    execution_info = create_execution_context_from(
        request.executionStartingRequest.currentExecutionInfo)
    run_hook(request, response, registry.before_suite(), execution_info)
Exemple #3
0
def _execute_before_suite_hook(request, response, _socket, clear=True):
    if clear:
        registry.clear()
        load_impls(get_step_impl_dir())
    if environ.get('DEBUGGING'):
        ptvsd.enable_attach('', address=('127.0.0.1', int(environ.get('DEBUG_PORT'))))
        logging.info(ATTACH_DEBUGGER_EVENT)
        t = Timer(int(environ.get("debugger_wait_time", 30)), handle_detached)
        t.start()
        ptvsd.wait_for_attach()
        t.cancel()

    execution_info = create_execution_context_from(request.executionStartingRequest.currentExecutionInfo)
    run_hook(request, response, registry.before_suite(), execution_info)
    response.executionStatusResponse.executionResult.message.extend(MessagesStore.pending_messages())
Exemple #4
0
def _execute_before_suite_hook(request, response, _socket, clear=True):
    if clear:
        registry.clear()
        load_impls(get_step_impl_dir())
    if environ.get('DEBUGGING'):
        ptvsd.enable_attach('',
                            address=('127.0.0.1',
                                     int(environ.get('DEBUG_PORT'))))
        logging.info(ATTACH_DEBUGGER_EVENT)
        signal.signal(signal.SIGALRM, handle_detached)
        signal.alarm(int(environ.get("debugger_wait_time", 30)))
        ptvsd.wait_for_attach()

    execution_info = create_execution_context_from(
        request.executionStartingRequest.currentExecutionInfo)
    run_hook(request, response, registry.before_suite(), execution_info)
 def test_before_suite_decorator(self):
     funcs = registry.before_suite()
     expected = ['before_suite1']
     self.assertEqual(expected, [func.__name__ for func in funcs])
Exemple #6
0
 def test_before_suite_decorator(self):
     funcs = registry.before_suite()
     expected = ['before_suite1']
     self.assertEqual(expected, [func.__name__ for func in funcs])
Exemple #7
0
def _execute_before_suite_hook(request, response, socket):
    execution_info = create_execution_context_from(request.executionStartingRequest.currentExecutionInfo)
    run_hook(request, response, registry.before_suite(), execution_info)