Skip to content

Commit fb0b642

Browse files
authored
[3.9] pythongh-113027: Fix test_variable_tzname in test_email (pythonGH-113821) (pythonGH-126477)
Determine the support of the Kyiv timezone by checking the result of astimezone() which uses the system tz database and not the one populated by zoneinfo. (cherry picked from commit 931d7e0)
1 parent 011fb84 commit fb0b642

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/test/test_email/test_utils.py

+2
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ def test_localtime_epoch_notz_daylight_false(self):
133133
def test_variable_tzname(self):
134134
t0 = datetime.datetime(1984, 1, 1, tzinfo=datetime.timezone.utc)
135135
t1 = utils.localtime(t0)
136+
if t1.tzname() == 'Europe':
137+
self.skipTest("Can't find a Kyiv timezone database")
136138
self.assertEqual(t1.tzname(), 'MSK')
137139
t0 = datetime.datetime(1994, 1, 1, tzinfo=datetime.timezone.utc)
138140
t1 = utils.localtime(t0)

0 commit comments

Comments
 (0)