Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def html_log_line(self):
return helpers.format_log_msg(
msg_type="test_case", description=self.description, timestamp=self.timestamp, format_type="html"
)
def html_log_line(self):
return helpers.format_log_msg(
msg_type=self.type,
description=self.description,
data=self.data,
timestamp=self.timestamp,
truncated=self.truncated,
format_type="html",
)
def text_render(self):
s = helpers.format_log_msg(
msg_type="test_case", description=self.description, timestamp=self.timestamp, format_type="terminal"
)
return s
def text_render(self):
return helpers.format_log_msg(
msg_type=self.type,
description=self.description,
data=self.data,
timestamp=self.timestamp,
truncated=self.truncated,
format_type="terminal",
)
def _print_log_msg(self, msg_type, msg=None, data=None):
print(helpers.format_log_msg(msg_type=msg_type, description=msg, data=data, indent_size=self.INDENT_SIZE),
file=self._file_handle)
def _print_log_msg(self, msg_type, msg=None, data=None):
print(
helpers.format_log_msg(msg_type=msg_type, description=msg, data=data, indent_size=self.INDENT_SIZE),
file=self._file_handle,
)
def open_test_step(self, description):
self._log_storage.append(helpers.format_log_msg(msg_type="step", description=description, format_type="curses"))
self._event_log = True
def log_pass(self, description=""):
self._log_storage.append(helpers.format_log_msg(msg_type="pass", description=description, format_type="curses"))
self._event_log = True
def open_test_case(self, test_case_id, name, index, *args, **kwargs):
self._log_storage = []
self._total_index = index
self._total_num_mutations = kwargs["num_mutations"]
self._current_name = name
self._current_index = kwargs["current_index"]
self._current_num_mutations = kwargs["current_num_mutations"]
self._log_storage.append(
helpers.format_log_msg(msg_type="test_case", description=test_case_id, format_type="curses")
)
self._event_log = True