Skip to content

Commit

Permalink
Added test for DateTimeIndex with timezone.
Browse files Browse the repository at this point in the history
  • Loading branch information
tp committed Jul 20, 2017
1 parent 5b728a9 commit 5eea4c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pandas/tests/dtypes/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,8 @@ def test__get_dtype_fails(input_param):
(pd.DatetimeIndex([1, 2]), np.datetime64),
(pd.DatetimeIndex([1, 2]).dtype, np.datetime64),
('<M8[ns]', np.datetime64),
(pd.DatetimeIndex([1, 2], tz='Europe/London'), com.DatetimeTZDtypeType),
(pd.DatetimeIndex([1, 2], tz='Europe/London').dtype, com.DatetimeTZDtypeType),
('datetime64[ns, Europe/London]', com.DatetimeTZDtypeType),
(pd.SparseSeries([1, 2], dtype='int32'), np.int32),
(pd.SparseSeries([1, 2], dtype='int32').dtype, np.int32),
Expand All @@ -598,7 +600,7 @@ def test__get_dtype_fails(input_param):
(None, type(None)),
(1, type(None)),
(1.2, type(None)),
(pd.DataFrame([1, 2]), type(None)),
(pd.DataFrame([1, 2]), type(None)), # composite dtype
])
def test__get_dtype_type(input_param, result):
assert com._get_dtype_type(input_param) == result

0 comments on commit 5eea4c1

Please sign in to comment.