MCPcopy Create free account
hub / github.com/dateutil/dateutil / testHourlyBadRRule

Method testHourlyBadRRule

tests/test_rrule.py:2298–2309  ·  view source on GitHub ↗

When `byhour` is specified with `freq=HOURLY`, there are certain combinations of `dtstart` and `byhour` which result in an rrule with no valid values. See https://github.com/dateutil/dateutil/issues/4

(self)

Source from the content-addressed store, hash-verified

2296 datetime(2010, 3, 22, 14, 1)])
2297
2298 def testHourlyBadRRule(self):
2299 """
2300 When `byhour` is specified with `freq=HOURLY`, there are certain
2301 combinations of `dtstart` and `byhour` which result in an rrule with no
2302 valid values.
2303
2304 See https://github.com/dateutil/dateutil/issues/4
2305 """
2306
2307 self.assertRaises(ValueError, rrule, HOURLY,
2308 **dict(interval=4, byhour=(7, 11, 15, 19),
2309 dtstart=datetime(1997, 9, 2, 9, 0)))
2310
2311 def testMinutelyBadRRule(self):
2312 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected