@@ -73,12 +73,13 @@ def color_categorical_pandas(request, pandas_type):
73
73
def dates_array (request ):
74
74
return np .array (
75
75
[
76
- datetime (year = 2013 , month = 10 , day = 10 ),
77
- datetime (year = 2013 , month = 11 , day = 10 ),
78
- datetime (year = 2013 , month = 12 , day = 10 ),
79
- datetime (year = 2014 , month = 1 , day = 10 ),
80
- datetime (year = 2014 , month = 2 , day = 10 ),
81
- ]
76
+ "2013-10-10" ,
77
+ "2013-11-10" ,
78
+ "2013-12-10" ,
79
+ "2014-01-10" ,
80
+ "2014-02-10" ,
81
+ ],
82
+ dtype = "datetime64[ns]" ,
82
83
)
83
84
84
85
@@ -183,7 +184,7 @@ def test_data_array_validator_dates_series(
183
184
assert isinstance (res , np .ndarray )
184
185
185
186
# Check dtype
186
- assert res .dtype == "object "
187
+ assert res .dtype == "<M8[ns] "
187
188
188
189
# Check values
189
190
np .testing .assert_array_equal (res , dates_array )
@@ -200,7 +201,7 @@ def test_data_array_validator_dates_dataframe(
200
201
assert isinstance (res , np .ndarray )
201
202
202
203
# Check dtype
203
- assert res .dtype == "object "
204
+ assert res .dtype == "<M8[ns] "
204
205
205
206
# Check values
206
207
np .testing .assert_array_equal (res , dates_array .reshape (len (dates_array ), 1 ))
0 commit comments