@@ -42,7 +42,7 @@ class TestPDApi(Base, tm.TestCase):
4242 'json' , 'lib' , 'index' , 'parser' ]
4343
4444 # these are already deprecated; awaiting removal
45- deprecated_modules = ['ols' , 'stats' ]
45+ deprecated_modules = ['ols' , 'stats' , 'datetools' ]
4646
4747 # misc
4848 misc = ['IndexSlice' , 'NaT' ]
@@ -61,14 +61,14 @@ class TestPDApi(Base, tm.TestCase):
6161 'SparseTimeSeries' , 'Panel4D' ,
6262 'SparseList' ]
6363
64- # these should be deperecated in the future
64+ # these should be deprecated in the future
6565 deprecated_classes_in_future = ['Term' , 'Panel' ]
6666
6767 # these should be removed from top-level namespace
6868 remove_classes_from_top_level_namespace = ['Expr' ]
6969
7070 # external modules exposed in pandas namespace
71- modules = ['np' , 'datetime' , 'datetools' ]
71+ modules = ['np' , 'datetime' ]
7272
7373 # top-level functions
7474 funcs = ['bdate_range' , 'concat' , 'crosstab' , 'cut' ,
@@ -99,7 +99,7 @@ class TestPDApi(Base, tm.TestCase):
9999 funcs_to = ['to_datetime' , 'to_msgpack' ,
100100 'to_numeric' , 'to_pickle' , 'to_timedelta' ]
101101
102- # these should be deperecated in the future
102+ # these should be deprecated in the future
103103 deprecated_funcs_in_future = ['pnow' , 'groupby' , 'info' ]
104104
105105 # these are already deprecated; awaiting removal
@@ -208,6 +208,19 @@ def test_removed_from_core_common(self):
208208 'ensure_float' ]:
209209 self .assertRaises (AttributeError , lambda : getattr (com , t ))
210210
211+
212+ class TestDatetools (tm .TestCase ):
213+
214+ def test_deprecation_access_func (self ):
215+ with tm .assert_produces_warning (FutureWarning ,
216+ check_stacklevel = False ):
217+ pd .datetools .to_datetime ('2016-01-01' )
218+
219+ def test_deprecation_access_obj (self ):
220+ with tm .assert_produces_warning (FutureWarning ,
221+ check_stacklevel = False ):
222+ pd .datetools .monthEnd
223+
211224if __name__ == '__main__' :
212225 import nose
213226 nose .runmodule (argv = [__file__ , '-vvs' , '-x' , '--pdb' , '--pdb-failure' ],
0 commit comments