Skip to content

Commit

Permalink
Test for pandas-dev#16726. unittest that ensures datetime is understood
Browse files Browse the repository at this point in the history
  • Loading branch information
hussain committed Jun 21, 2017
1 parent 520f87b commit b8a6007
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pandas/tests/series/test_datetime_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,3 +409,11 @@ def test_date_tz(self):
date(2015, 11, 22)])
assert_series_equal(s.dt.date, expected)
assert_series_equal(s.apply(lambda x: x.date()), expected)

def test_datetime_understood(self):
# Ensures it doesn't throw an exception reported in #16726
try:
pd.Series(pd.date_range("2012-01-01", periods=3)) - pd.offsets.DateOffset(days=6)
except Exception:
assert 'data type "datetime" not understood'

0 comments on commit b8a6007

Please sign in to comment.