def prepareTestResult(self, result):
def _add_success(result, test):<EOL><INDENT>"""<STR_LIT>"""<EOL>if result.showAll:<EOL><INDENT>output = '<STR_LIT>'<EOL>time_taken = self._timed_tests.get(test.id())['<STR_LIT:time>']<EOL>if time_taken is not None:<EOL><INDENT>color = self._get_result_color(time_taken)<EOL>output += '<STR_LIT>'.format(self._colored_time(time_taken, color))<EOL><DEDENT>result.stream.writeln(output)<EOL><DEDENT>elif result.dots:<EOL><INDENT>result.stream.write('<STR_LIT:.>')<EOL>result.stream.flush()<EOL><DEDENT><DEDENT>result.addSuccess = lambda test: _add_success(result, test)<EOL>result._timed_tests = self._timed_tests<EOL>
Called before the first test is run.