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

Method testTzwinLocalTimeOnlyDST

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

Source from the content-addressed store, hash-verified

2413 self.assertNotEqual(twl1, tw_est)
2414
2415 def testTzwinLocalTimeOnlyDST(self):
2416 # For zones with DST, .dst() should return None
2417 with TZWinContext('Eastern Standard Time'):
2418 twl = tz.tzwinlocal()
2419 self.assertIs(dt_time(14, 10, tzinfo=twl).dst(), None)
2420
2421 # This zone has no DST, so .dst() can return 0
2422 with TZWinContext('South Africa Standard Time'):
2423 twl = tz.tzwinlocal()
2424 self.assertEqual(dt_time(14, 10, tzinfo=twl).dst(), timedelta(0))
2425
2426 def testTzwinLocalTimeOnlyUTCOffset(self):
2427 # For zones with DST, .utcoffset() should return None

Callers

nothing calls this directly

Calls 2

TZWinContextClass · 0.85
dstMethod · 0.45

Tested by

no test coverage detected