def assert_series_equal(left, right, check_names=True, **kwargs):
 try:
  return tm.assert_series_equal(left, right, check_names=check_names, **kwargs)
 except TypeError:
  if check_names:
   assert (left.name == right.name)
  return tm.assert_series_equal(left, right, **kwargs)

def assert_series_equal ( left , right , check_names = True , ** kwargs ) : try : return tm . assert_series_equal ( left , right , check_names = check_names , ** kwargs ) except TypeError : if check_names : assert ( left . name == right . name ) return tm . assert_series_equal ( left , right , ** kwargs )
backwards compatibility wrapper for pandas .