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

Method testTzwinLocalEquality

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

Source from the content-addressed store, hash-verified

2391 repr('Pacific Standard Time') + ')')
2392
2393 def testTzwinLocalEquality(self):
2394 tw_est = tz.tzwin('Eastern Standard Time')
2395 tw_pst = tz.tzwin('Pacific Standard Time')
2396
2397 with TZWinContext('Eastern Standard Time'):
2398 twl1 = tz.tzwinlocal()
2399 twl2 = tz.tzwinlocal()
2400
2401 self.assertEqual(twl1, twl2)
2402 self.assertEqual(twl1, tw_est)
2403 self.assertNotEqual(twl1, tw_pst)
2404
2405 with TZWinContext('Pacific Standard Time'):
2406 twl1 = tz.tzwinlocal()
2407 twl2 = tz.tzwinlocal()
2408 tw = tz.tzwin('Pacific Standard Time')
2409
2410 self.assertEqual(twl1, twl2)
2411 self.assertEqual(twl1, tw)
2412 self.assertEqual(twl1, tw_pst)
2413 self.assertNotEqual(twl1, tw_est)
2414
2415 def testTzwinLocalTimeOnlyDST(self):
2416 # For zones with DST, .dst() should return None

Callers

nothing calls this directly

Calls 1

TZWinContextClass · 0.85

Tested by

no test coverage detected