def compare_search_obj(obj_a, obj_b):
 assert (_num_difference(obj_a, obj_b) == 0)
 compare_attrs(obj_a, obj_b, list(obj_a.__dict__))
 if (not isinstance(obj_a, SearchIO.HSPFragment)):
  assert (len(obj_a) == len(obj_b)), ('length: %i vs %i for %r vs %r' % (len(obj_a), len(obj_b), obj_a, obj_b))
  for (item_a, item_b) in zip(obj_a, obj_b):
   assert compare_search_obj(item_a, item_b)
 return True

def compare_search_obj ( obj_a , obj_b ) : assert ( _num_difference ( obj_a , obj_b ) == 0 ) compare_attrs ( obj_a , obj_b , list ( obj_a . __dict__ ) ) if ( not isinstance ( obj_a , SearchIO . HSPFragment ) ) : assert ( len ( obj_a ) == len ( obj_b ) ) , ( 'length: %i vs %i for %r vs %r' % ( len ( obj_a ) , len ( obj_b ) , obj_a , obj_b ) ) for ( item_a , item_b ) in zip ( obj_a , obj_b ) : assert compare_search_obj ( item_a , item_b ) return True
compares attribute values of two queryresult objects .