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

Method testStrWithTZIDCallableFailure

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

Source from the content-addressed store, hash-verified

2723 self.assertEqual(list(rr), exp)
2724
2725 def testStrWithTZIDCallableFailure(self):
2726 rrstr = ('DTSTART;TZID=America/New_York:19970902T090000\n' +
2727 'RRULE:FREQ=YEARLY;COUNT=3')
2728
2729 class TzInfoError(Exception):
2730 pass
2731
2732 def tzinfos(tzstr):
2733 if tzstr == 'America/New_York':
2734 raise TzInfoError('Invalid!')
2735 return None
2736
2737 with self.assertRaises(TzInfoError):
2738 rrulestr(rrstr, tzids=tzinfos)
2739
2740 def testStrWithConflictingTZID(self):
2741 # RFC 5545 Section 3.3.5, FORM #2: DATE WITH UTC TIME

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected