Skip to content

Commit b8a6007

Browse files
author
hussain
committed
Test for pandas-dev#16726. unittest that ensures datetime is understood
1 parent 520f87b commit b8a6007

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/tests/series/test_datetime_values.py

+8
Original file line numberDiff line numberDiff line change
@@ -409,3 +409,11 @@ def test_date_tz(self):
409409
date(2015, 11, 22)])
410410
assert_series_equal(s.dt.date, expected)
411411
assert_series_equal(s.apply(lambda x: x.date()), expected)
412+
413+
def test_datetime_understood(self):
414+
# Ensures it doesn't throw an exception reported in #16726
415+
try:
416+
pd.Series(pd.date_range("2012-01-01", periods=3)) - pd.offsets.DateOffset(days=6)
417+
except Exception:
418+
assert 'data type "datetime" not understood'
419+

0 commit comments

Comments
 (0)