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

Method testMonthlyByWeekDay

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

Source from the content-addressed store, hash-verified

435 datetime(1998, 3, 5, 9, 0)])
436
437 def testMonthlyByWeekDay(self):
438 self.assertEqual(list(rrule(MONTHLY,
439 count=3,
440 byweekday=(TU, TH),
441 dtstart=datetime(1997, 9, 2, 9, 0))),
442 [datetime(1997, 9, 2, 9, 0),
443 datetime(1997, 9, 4, 9, 0),
444 datetime(1997, 9, 9, 9, 0)])
445
446 # Third Monday of the month
447 self.assertEqual(rrule(MONTHLY,
448 byweekday=(MO(+3)),
449 dtstart=datetime(1997, 9, 1)).between(datetime(1997, 9, 1),
450 datetime(1997, 12, 1)),
451 [datetime(1997, 9, 15, 0, 0),
452 datetime(1997, 10, 20, 0, 0),
453 datetime(1997, 11, 17, 0, 0)])
454
455 def testMonthlyByNWeekDay(self):
456 self.assertEqual(list(rrule(MONTHLY,

Callers

nothing calls this directly

Calls 2

rruleClass · 0.90
betweenMethod · 0.80

Tested by

no test coverage detected