Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def print_results(results):
for message in results.test_results:
if message.result == messages.Result.PASS:
color = texttable.bcolors.GREEN
elif message.result == messages.Result.FAIL:
color = texttable.bcolors.GREEN
else:
color = texttable.bcolors.YELLOW
label = texttable.get_color_string(color, message.result)
logging.info('{} {}'.format(label, message.title))
@classmethod
def _make_diff_row(cls, color, label, message):
label = texttable.get_color_string(color, label)
path = texttable.get_color_string(
texttable.bcolors.WHITE, message.path)
formatted_author = cls._format_author(message.deployed_by, True)
deployed = str(message.deployed).split('.')[0][
:-3] if message.deployed else ''
return [label, path, deployed, formatted_author]
@classmethod
def _make_diff_row(cls, color, label, message):
label = texttable.get_color_string(color, label)
path = texttable.get_color_string(
texttable.bcolors.WHITE, message.path)
formatted_author = cls._format_author(message.deployed_by, True)
deployed = str(message.deployed).split('.')[0][
:-3] if message.deployed else ''
return [label, path, deployed, formatted_author]