def _categorize_result(r):
 from . import conf
 if ((u'network_error' in r) and (r[u'network_error'] is not None)):
  r[u'out_db_name'] = u'nerr'
  r[u'expected'] = u'broken'
 elif (((r[u'nexceptions'] == 0) and (r[u'nwarnings'] == 0)) or r[u'warning_types'].issubset(conf.noncritical_warnings)):
  r[u'out_db_name'] = u'good'
  r[u'expected'] = u'good'
 elif (r[u'nexceptions'] > 0):
  r[u'out_db_name'] = u'excp'
  r[u'expected'] = u'incorrect'
 elif (r[u'nwarnings'] > 0):
  r[u'out_db_name'] = u'warn'
  r[u'expected'] = u'incorrect'
 else:
  raise InvalidValidationAttribute(u'Unhandled validation result attributes: {0}'.format(r._attributes))

def _categorize_result ( r ) : from . import conf if ( ( u'network_error' in r ) and ( r [ u'network_error' ] is not None ) ) : r [ u'out_db_name' ] = u'nerr' r [ u'expected' ] = u'broken' elif ( ( ( r [ u'nexceptions' ] == 0 ) and ( r [ u'nwarnings' ] == 0 ) ) or r [ u'warning_types' ] . issubset ( conf . noncritical_warnings ) ) : r [ u'out_db_name' ] = u'good' r [ u'expected' ] = u'good' elif ( r [ u'nexceptions' ] > 0 ) : r [ u'out_db_name' ] = u'excp' r [ u'expected' ] = u'incorrect' elif ( r [ u'nwarnings' ] > 0 ) : r [ u'out_db_name' ] = u'warn' r [ u'expected' ] = u'incorrect' else : raise InvalidValidationAttribute ( u'Unhandled validation result attributes: {0}' . format ( r . _attributes ) )
set success codes .