@@ -42,7 +42,7 @@ class TestPDApi(Base, tm.TestCase):
42
42
'json' , 'lib' , 'index' , 'parser' ]
43
43
44
44
# these are already deprecated; awaiting removal
45
- deprecated_modules = ['ols' , 'stats' ]
45
+ deprecated_modules = ['ols' , 'stats' , 'datetools' ]
46
46
47
47
# misc
48
48
misc = ['IndexSlice' , 'NaT' ]
@@ -61,14 +61,14 @@ class TestPDApi(Base, tm.TestCase):
61
61
'SparseTimeSeries' , 'Panel4D' ,
62
62
'SparseList' ]
63
63
64
- # these should be deperecated in the future
64
+ # these should be deprecated in the future
65
65
deprecated_classes_in_future = ['Term' , 'Panel' ]
66
66
67
67
# these should be removed from top-level namespace
68
68
remove_classes_from_top_level_namespace = ['Expr' ]
69
69
70
70
# external modules exposed in pandas namespace
71
- modules = ['np' , 'datetime' , 'datetools' ]
71
+ modules = ['np' , 'datetime' ]
72
72
73
73
# top-level functions
74
74
funcs = ['bdate_range' , 'concat' , 'crosstab' , 'cut' ,
@@ -99,7 +99,7 @@ class TestPDApi(Base, tm.TestCase):
99
99
funcs_to = ['to_datetime' , 'to_msgpack' ,
100
100
'to_numeric' , 'to_pickle' , 'to_timedelta' ]
101
101
102
- # these should be deperecated in the future
102
+ # these should be deprecated in the future
103
103
deprecated_funcs_in_future = ['pnow' , 'groupby' , 'info' ]
104
104
105
105
# these are already deprecated; awaiting removal
@@ -208,6 +208,19 @@ def test_removed_from_core_common(self):
208
208
'ensure_float' ]:
209
209
self .assertRaises (AttributeError , lambda : getattr (com , t ))
210
210
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
+
211
224
if __name__ == '__main__' :
212
225
import nose
213
226
nose .runmodule (argv = [__file__ , '-vvs' , '-x' , '--pdb' , '--pdb-failure' ],
0 commit comments