def test_calendar_range(): assert get_calendar_range( (None, datetime(2016, 2, 1, tzinfo=pytz.utc)), months=3, ) == ( month_to_index(2015, 11), month_to_index(2016, 1), )
def test_month_indexing(): assert index_to_month(month_to_index(1986, 10)) == (1986, 10)