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

Method testTzwinTimeOnlyDST

tests/test_tz.py:2302–2310  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2300 self.assertFalse(EST != ComparesEqual)
2301
2302 def testTzwinTimeOnlyDST(self):
2303 # For zones with DST, .dst() should return None
2304 tw_est = tz.tzwin('Eastern Standard Time')
2305 self.assertIs(dt_time(14, 10, tzinfo=tw_est).dst(), None)
2306
2307 # This zone has no DST, so .dst() can return 0
2308 tw_sast = tz.tzwin('South Africa Standard Time')
2309 self.assertEqual(dt_time(14, 10, tzinfo=tw_sast).dst(),
2310 timedelta(0))
2311
2312 def testTzwinTimeOnlyUTCOffset(self):
2313 # For zones with DST, .utcoffset() should return None

Callers

nothing calls this directly

Calls 1

dstMethod · 0.45

Tested by

no test coverage detected