def test_yearly_str(self): """ Test yearly interval "yly". """ expected = ("2011", "2012", "2013") actual = date_range("2011-12-15", "2013-12-15", "yly") self.assertSequenceEqual(expected, list(actual)) return
def test_yearly_ymd(self): """ Test yearly interval (2, 0, 0). """ expected = ("2011-12-15", "2013-12-15", "2015-12-15") actual = date_range("2011-12-15", "2015-12-15", (2, 0, 0)) self.assertSequenceEqual(expected, list(actual)) return
def test_monthly_ymd(self): """ Test monthly interval (0, 2, 0) """ expected = ("2011-12-15", "2012-02-15", "2012-04-15") actual = date_range("2011-12-15", "2012-04-15", (0, 2, 0)) self.assertSequenceEqual(expected, list(actual)) return
def test_monthly_str(self): """ Test a monthly interval "mly". """ expected = ("2011-12", "2012-01", "2012-02") actual = date_range("20111215", "2012-02-15", "mly") self.assertSequenceEqual(expected, list(actual)) return
def test_daily_ymd(self): """ Test daily interval (0, 0, 2) """ expected = ("2011-12-31", "2012-01-02", "2012-01-04") actual = date_range("2011-12-31", "2012-01-04", (0, 0, 2)) self.assertSequenceEqual(expected, list(actual)) return
def test_daily_str(self): """ Test daily interval "dly". """ expected = ("2011-12-31", "2012-01-01", "2012-01-02") actual = date_range("2011-12-31", "2012-01-02", "dly") self.assertSequenceEqual(expected, list(actual)) return
def test_defaults(self): """ Test defaults for edate and interval. """ expected = ("2011-12-31",) actual = date_range("2011-12-31") self.assertSequenceEqual(expected, list(actual)) return