def assert_sp_series_equal(left, right, check_dtype=True, exact_indices=True, check_series_type=True, check_names=True, obj='SparseSeries'):
 assertIsInstance(left, pd.SparseSeries, '[SparseSeries]')
 assertIsInstance(right, pd.SparseSeries, '[SparseSeries]')
 if check_series_type:
  assert_class_equal(left, right, obj=obj)
 assert_index_equal(left.index, right.index, obj='{0}.index'.format(obj))
 assert_sp_array_equal(left.block.values, right.block.values)
 if check_names:
  assert_attr_equal('name', left, right)
 if check_dtype:
  assert_attr_equal('dtype', left, right)
 assert_numpy_array_equal(left.values, right.values)

def assert_sp_series_equal ( left , right , check_dtype = True , exact_indices = True , check_series_type = True , check_names = True , obj = 'SparseSeries' ) : assertIsInstance ( left , pd . SparseSeries , '[SparseSeries]' ) assertIsInstance ( right , pd . SparseSeries , '[SparseSeries]' ) if check_series_type : assert_class_equal ( left , right , obj = obj ) assert_index_equal ( left . index , right . index , obj = '{0}.index' . format ( obj ) ) assert_sp_array_equal ( left . block . values , right . block . values ) if check_names : assert_attr_equal ( 'name' , left , right ) if check_dtype : assert_attr_equal ( 'dtype' , left , right ) assert_numpy_array_equal ( left . values , right . values )
check that the left and right sparseseries are equal .