MCPcopy Index your code
hub / github.com/python/cpython / test_variable_tzname

Method test_variable_tzname

Lib/test/test_email/test_utils.py:155–163  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

153
154 @test.support.run_with_tz('Europe/Kyiv')
155 def test_variable_tzname(self):
156 t0 = datetime.datetime(1984, 1, 1, tzinfo=datetime.timezone.utc)
157 t1 = utils.localtime(t0)
158 if t1.tzname() in ('Europe', 'UTC'):
159 self.skipTest("Can't find a Kyiv timezone database")
160 self.assertEqual(t1.tzname(), 'MSK')
161 t0 = datetime.datetime(1994, 1, 1, tzinfo=datetime.timezone.utc)
162 t1 = utils.localtime(t0)
163 self.assertEqual(t1.tzname(), 'EET')
164
165
166# Issue #24836: The timezone files are out of date (pre 2011k)

Callers

nothing calls this directly

Calls 4

datetimeMethod · 0.80
skipTestMethod · 0.80
tznameMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected