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

Method testStrUntilWithTZ

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

Source from the content-addressed store, hash-verified

3023 "UNTIL=19990101T000000;BYDAY=1TU,-1TH\n"))
3024
3025 def testStrUntilWithTZ(self):
3026 NYC = tz.gettz('America/New_York')
3027 self.assertIsNotNone(NYC)
3028 rr = list(rrulestr("DTSTART;TZID=America/New_York:19970101T000000\n"
3029 "RRULE:FREQ=YEARLY;"
3030 "UNTIL=19990101T000000Z\n"))
3031 self.assertEqual(list(rr), [datetime(1997, 1, 1, 0, 0, 0, tzinfo=NYC),
3032 datetime(1998, 1, 1, 0, 0, 0, tzinfo=NYC)])
3033
3034 def testStrEmptyByDay(self):
3035 with self.assertRaises(ValueError):

Callers

nothing calls this directly

Calls 1

gettzMethod · 0.45

Tested by

no test coverage detected