def GetUnixErrorOutput(filename, error, new_error=False):

  line = ''

  if error.token:
    line = '%d' % error.token.line_number

  error_code = '%04d' % error.code
  if new_error:
    error_code = 'New Error ' + error_code
  return '%s:%s:(%s) %s' % (filename, line, error_code, error.message)
Compare the results of a raw query against expected results
dataset/ETHPy150Open google/closure-linter/closure_linter/common/erroroutput.py/GetUnixErrorOutput--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/tests/modeltests/raw_query/tests.py/RawQueryTests.assertProcessed