Exemplo n.º 1
0
 def test_last_week_of_month_on_offset(self, n, weekday, date, tz):
     # GH 19036, GH 18977 _adjust_dst was incorrect for LastWeekOfMonth
     offset = LastWeekOfMonth(n=n, weekday=weekday)
     ts = Timestamp(date, tz=tz)
     slow = (ts + offset) - offset == ts
     fast = offset.is_on_offset(ts)
     assert fast == slow
Exemplo n.º 2
0
 def test_is_on_offset(self, case):
     weekday, dt, expected = case
     offset = LastWeekOfMonth(weekday=weekday)
     assert offset.is_on_offset(dt) == expected