Exemple #1
0
    def __init__(self, log_dir=None, log_level=LogLevel.ERROR, css_path=None):
        if log_dir: 
            log_dir = os.path.abspath(log_dir)
        if css_path: 
            css_path = os.path.abspath(css_path) 

        TestLogger.__init__(self, log_dir=log_dir, log_level=log_level)
        self.css_path = css_path
        self.failed_test_count = 0
        self.lock = Lock()
Exemple #2
0
    def __init__(self, log_dir=None, log_level=LogLevel.ERROR, css_path=None):
        if log_dir:
            log_dir = os.path.abspath(log_dir)
        if css_path:
            css_path = os.path.abspath(css_path)

        TestLogger.__init__(self, log_dir=log_dir, log_level=log_level)
        self.css_path = css_path
        self.failed_test_count = 0
        self.lock = Lock()
Exemple #3
0
 def skippingTestFunction(self,
                          class_instance,
                          func,
                          func_type=TestFunctionType.TEST,
                          thread_num=None):
     func_str = TestLogger.format_function_name(class_instance, func)
     # Only print output if this was a test function
     if func_type == TestFunctionType.TEST:
         self.output_queue.put((func_str, self.skipped_msg, None))
    def finishedTestFunction(self, class_instance, func, func_type=TestFunctionType.TEST, thread_num=None):
        with self.lock:
            current_test = self.current_tests.pop((class_instance, func, thread_num))

        # Only print output if this was a test function, or if the function failed
        if func_type == TestFunctionType.TEST or current_test['func_failed']:
            func_str = TestLogger.format_function_name(class_instance, func)
            if current_test['func_failed']:
                msg = self.failure_msg
            else:
                msg = self.success_msg

            self.output_queue.put(
                (func_str, msg, current_test['traceback'])
            )

        if self.log_level >= LogLevel.DEBUG:
            self.log_debug_info(class_instance, func)
    def finishedTestFunction(self, class_instance, func, func_type=TestFunctionType.TEST, thread_num=None):
        with self.lock:
            current_test = self.current_tests.pop((class_instance, func, thread_num))

        # Only print output if this was a test function, or if the function failed
        if func_type == TestFunctionType.TEST or current_test['func_failed']:
            func_str = TestLogger.format_function_name(class_instance, func)
            if current_test['func_failed']:
                msg = self.failure_msg
            else:
                msg = self.success_msg

            self.output_queue.put(
                (func_str, msg, current_test['traceback'])
            )

        #AB - removing logLevel
        #if self.log_level >= LogLevel.DEBUG:
        ss_loc = self.log_debug_info(class_instance, func)
 def skippingTestFunction(self, class_instance, func, func_type=TestFunctionType.TEST, thread_num=None):
     func_str = TestLogger.format_function_name(class_instance, func)
     # Only print output if this was a test function
     if func_type == TestFunctionType.TEST:
         self.output_queue.put((func_str, self.skipped_msg, None))