def test_is_on_offset(self): tests = [ (self._offset(), datetime(2008, 1, 1), True), (self._offset(), datetime(2008, 1, 5), False), ] for offset, d, expected in tests: assert_is_on_offset(offset, d, expected)
def test_is_on_offset(self, weekday): offset = Week(weekday=weekday) for day in range(1, 8): date = datetime(2008, 1, day) if day % 7 == weekday: expected = True else: expected = False assert_is_on_offset(offset, date, expected)
def test_is_on_offset(self, case): dt, expected = case assert_is_on_offset(SemiMonthBegin(), dt, expected)
def test_is_on_offset(self, case): offset, dt, expected = case assert_is_on_offset(offset, dt, expected)