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

Method testHourlyBadRRule

tests/test_rrule.py:2306–2317  ·  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

2304 datetime(2004, 1, 5, 9, 0)])
2305
2306 def testHourlyBadRRule(self):
2307 """
2308 When `byhour` is specified with `freq=HOURLY`, there are certain
2309 combinations of `dtstart` and `byhour` which result in an rrule with no
2310 valid values.
2311
2312 See https://github.com/dateutil/dateutil/issues/4
2313 """
2314
2315 self.assertRaises(ValueError, rrule, HOURLY,
2316 **dict(interval=4, byhour=(7, 11, 15, 19),
2317 dtstart=datetime(1997, 9, 2, 9, 0)))
2318
2319 def testMinutelyBadRRule(self):
2320 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected