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

Method testMonthlyByWeekDay

tests/test_rrule.py:450–466  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

448 datetime(1998, 3, 5, 9, 0)])
449
450 def testMonthlyByWeekDay(self):
451 self.assertEqual(list(rrule(MONTHLY,
452 count=3,
453 byweekday=(TU, TH),
454 dtstart=datetime(1997, 9, 2, 9, 0))),
455 [datetime(1997, 9, 2, 9, 0),
456 datetime(1997, 9, 4, 9, 0),
457 datetime(1997, 9, 9, 9, 0)])
458
459 # Third Monday of the month
460 self.assertEqual(rrule(MONTHLY,
461 byweekday=(MO(+3)),
462 dtstart=datetime(1997, 9, 1)).between(datetime(1997, 9, 1),
463 datetime(1997, 12, 1)),
464 [datetime(1997, 9, 15, 0, 0),
465 datetime(1997, 10, 20, 0, 0),
466 datetime(1997, 11, 17, 0, 0)])
467
468 def testMonthlyByNWeekDay(self):
469 self.assertEqual(list(rrule(MONTHLY,

Callers

nothing calls this directly

Calls 2

rruleClass · 0.90
betweenMethod · 0.80

Tested by

no test coverage detected