def output_test_case_result(self, test_case, level): name = test_case.pretty_name if level > 0: name = u'{0} {1}'.format(self.separator, name) status, name = self.get_test_case_status(test_case, name) self.output(name, level, status) print_test_args(test_case.execute_kwargs, level, status, self.use_color) if test_case.doc and self.output_docstrings: print_indent_msg(test_case.doc, level + 1, status) # Print error if it exists if test_case.error: for line in test_case.error: self.output(line, level + 2, TestStatus.FAIL) if status == TestStatus.FAIL or self.show_all: print_expects( test_case, level, self.use_color, self.use_unicode )
def print_error(self, wrapper): """ A crude way of output the errors for now. This needs to be cleaned up into something better. """ level = 0 parent = wrapper.parent while parent: print_test_msg(parent.name, level, TestStatus.FAIL, self.use_color) level += 1 parent = parent.parent print_test_msg(wrapper.name, level, TestStatus.FAIL, self.use_color) print_test_args(wrapper.execute_kwargs, level, TestStatus.FAIL, self.use_color) if wrapper.error: for line in wrapper.error: print_test_msg( line, level + 2, TestStatus.FAIL, self.use_color ) print_expects(wrapper, level, use_color=self.use_color)
def print_error(self, wrapper): """ A crude way of output the errors for now. This needs to be cleaned up into something better. """ level = 0 parent = wrapper.parent while parent: print_test_msg(parent.name, level, TestStatus.FAIL, self.use_color) level += 1 parent = parent.parent print_test_msg(wrapper.name, level, TestStatus.FAIL, self.use_color) print_test_args(wrapper.execute_kwargs, level, TestStatus.FAIL, self.use_color) if wrapper.error: for line in wrapper.error: print_test_msg(line, level + 2, TestStatus.FAIL, self.use_color) print_expects(wrapper, level, use_color=self.use_color)