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

Method testStrWithTZIDMapping

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

Source from the content-addressed store, hash-verified

2691 datetime(1999, 9, 2, 9, 0, tzinfo=NYC)])
2692
2693 def testStrWithTZIDMapping(self):
2694 rrstr = ("DTSTART;TZID=Eastern:19970902T090000\n" +
2695 "RRULE:FREQ=YEARLY;COUNT=3")
2696
2697 NYC = tz.gettz('America/New_York')
2698 self.assertIsNotNone(NYC)
2699 rr = rrulestr(rrstr, tzids={'Eastern': NYC})
2700 exp = [datetime(1997, 9, 2, 9, 0, tzinfo=NYC),
2701 datetime(1998, 9, 2, 9, 0, tzinfo=NYC),
2702 datetime(1999, 9, 2, 9, 0, tzinfo=NYC)]
2703
2704 self.assertEqual(list(rr), exp)
2705
2706 def testStrWithTZIDCallable(self):
2707 rrstr = ('DTSTART;TZID=UTC+04:19970902T090000\n' +

Callers

nothing calls this directly

Calls 1

gettzMethod · 0.45

Tested by

no test coverage detected