def test_month_boundary(self): """ Months wrap correctly """ start_day = arrow.get('2015-11-30').date() # Monday actual = builder.weekdays(start_day) expected = [ arrow.get('2015-11-30').date(), arrow.get('2015-12-01').date(), arrow.get('2015-12-02').date(), arrow.get('2015-12-03').date(), arrow.get('2015-12-04').date(), arrow.get('2015-12-05').date(), arrow.get('2015-12-06').date(), ] assert actual == expected, actual
def test_sunday(self): """ Sunday is the end of the week """ start_day = arrow.get('2015-12-13').date() # Sunday actual = builder.weekdays(start_day) expected = [ arrow.get('2015-12-07').date(), arrow.get('2015-12-08').date(), arrow.get('2015-12-09').date(), arrow.get('2015-12-10').date(), arrow.get('2015-12-11').date(), arrow.get('2015-12-12').date(), arrow.get('2015-12-13').date(), ] assert actual == expected, actual