def ReportTestResult(name, metadata):
 now = time.time()
 colorizer = Colorizer()
 if (metadata['exit_code'] == 0):
  result = colorizer.Render('GREEN', 'PASSED')
 else:
  result = colorizer.Render('RED', 'FAILED')
  result += open(metadata['output_path'], 'rb').read()
 print ' DCTB {0: <40} {1} in {2: >6.2f}s'.format(name, result, (now - metadata['start']))

def ReportTestResult ( name , metadata ) : now = time . time ( ) colorizer = Colorizer ( ) if ( metadata [ 'exit_code' ] == 0 ) : result = colorizer . Render ( 'GREEN' , 'PASSED' ) else : result = colorizer . Render ( 'RED' , 'FAILED' ) result += open ( metadata [ 'output_path' ] , 'rb' ) . read ( ) print ' DCTB {0: <40} {1} in {2: >6.2f}s' . format ( name , result , ( now - metadata [ 'start' ] ) )
print statistics about the outcome of a test run .