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

Method testTzwinLocalTimeOnlyTZName

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

Source from the content-addressed store, hash-verified

2436 timedelta(hours=2))
2437
2438 def testTzwinLocalTimeOnlyTZName(self):
2439 # For zones with DST, the name defaults to standard time
2440 with TZWinContext('Eastern Standard Time'):
2441 twl = tz.tzwinlocal()
2442 self.assertEqual(dt_time(14, 10, tzinfo=twl).tzname(),
2443 'Eastern Standard Time')
2444
2445 # For zones with no DST, this should work normally.
2446 with TZWinContext('South Africa Standard Time'):
2447 twl = tz.tzwinlocal()
2448 self.assertEqual(dt_time(14, 10, tzinfo=twl).tzname(),
2449 'South Africa Standard Time')
2450
2451
2452class TzPickleTest(PicklableMixin, unittest.TestCase):

Callers

nothing calls this directly

Calls 2

TZWinContextClass · 0.85
tznameMethod · 0.45

Tested by

no test coverage detected