<s> """<STR_LIT>""" <EOL> import re <EOL> from distutils . version import StrictVersion , LooseVersion <EOL> import numpy as np <EOL> import numpy . testing as npt <EOL> import pandas <EOL> import pandas . util . testing as pdt <EOL> def strip_rc ( version ) : <EOL> return re . sub ( r"<STR_LIT>" , "<STR_LIT>" , version ) <EOL> def is_pandas_min_version ( min_version ) : <EOL> '''<STR_LIT>''' <EOL> from pandas import __version__ as pversion <EOL> return LooseVersion ( pversion ) >= min_version <EOL> from numpy . testing import ( assert_allclose , assert_almost_equal , <EOL> assert_approx_equal , assert_array_almost_equal , <EOL> assert_array_almost_equal_nulp , assert_array_equal , assert_array_less , <EOL> assert_array_max_ulp , assert_raises , assert_string_equal , assert_warns ) <EOL> if not is_pandas_min_version ( '<STR_LIT>' ) : <EOL> def assert_equal ( actual , desired , err_msg = '<STR_LIT>' , verbose = True , ** kwds ) : <EOL> npt . assert_equal ( actual , desired , err_msg = '<STR_LIT>' , verbose = True ) <EOL> else : <EOL> def assert_equal ( actual , desired , err_msg = '<STR_LIT>' , verbose = True , ** kwds ) : <EOL> if isinstance ( desired , pandas . Index ) : <EOL> pdt . assert_index_equal ( actual , desired ) <EOL> elif isinstance ( desired , pandas . Series ) : <EOL> pdt . assert_series_equal ( actual , desired , ** kwds ) <EOL> elif isinstance ( desired , pandas . DataFrame ) : <EOL> pdt . assert_frame_equal ( actual , desired , ** kwds ) <EOL> else : <EOL> npt . assert_equal ( actual , desired , err_msg = '<STR_LIT>' , verbose = True ) </s>
