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), )