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

Method testTzwinLocalTimeOnlyDST

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

Source from the content-addressed store, hash-verified

2338 self.assertNotEqual(twl1, tw_est)
2339
2340 def testTzwinLocalTimeOnlyDST(self):
2341 # For zones with DST, .dst() should return None
2342 with TZWinContext('Eastern Standard Time'):
2343 twl = tz.tzwinlocal()
2344 self.assertIs(dt_time(14, 10, tzinfo=twl).dst(), None)
2345
2346 # This zone has no DST, so .dst() can return 0
2347 with TZWinContext('South Africa Standard Time'):
2348 twl = tz.tzwinlocal()
2349 self.assertEqual(dt_time(14, 10, tzinfo=twl).dst(), timedelta(0))
2350
2351 def testTzwinLocalTimeOnlyUTCOffset(self):
2352 # 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