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

Method testStrUntilWithTZ

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

Source from the content-addressed store, hash-verified

3014 "UNTIL=19990101T000000;BYDAY=1TU,-1TH\n"))
3015
3016 def testStrUntilWithTZ(self):
3017 NYC = tz.gettz('America/New_York')
3018 rr = list(rrulestr("DTSTART;TZID=America/New_York:19970101T000000\n"
3019 "RRULE:FREQ=YEARLY;"
3020 "UNTIL=19990101T000000Z\n"))
3021 self.assertEqual(list(rr), [datetime(1997, 1, 1, 0, 0, 0, tzinfo=NYC),
3022 datetime(1998, 1, 1, 0, 0, 0, tzinfo=NYC)])
3023
3024 def testStrEmptyByDay(self):
3025 with self.assertRaises(ValueError):

Callers

nothing calls this directly

Calls 1

gettzMethod · 0.45

Tested by

no test coverage detected