https://github.com/python/cpython/commit/64d8f39a12821adc24f899790b6d03e4599949f4 commit: 64d8f39a12821adc24f899790b6d03e4599949f4 branch: 3.11 author: Miss Islington (bot) <[email protected]> committer: serhiy-storchaka <[email protected]> date: 2024-01-12T11:59:23Z summary:
[3.11] gh-113027: Fix test_variable_tzname in test_email (GH-113821) (GH-113832) 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 931d7e052e22aa01e18fcc67ed71b6ea305aff71) Co-authored-by: Serhiy Storchaka <[email protected]> files: M Lib/test/test_email/test_utils.py diff --git a/Lib/test/test_email/test_utils.py b/Lib/test/test_email/test_utils.py index 81109a7508ac0d..342b8507355d71 100644 --- a/Lib/test/test_email/test_utils.py +++ b/Lib/test/test_email/test_utils.py @@ -143,12 +143,12 @@ def test_localtime_epoch_notz_daylight_false(self): t2 = utils.localtime(t0.replace(tzinfo=None)) self.assertEqual(t1, t2) - @unittest.skipUnless("Europe/Kyiv" in zoneinfo.available_timezones(), - "Can't find a Kyiv timezone database") @test.support.run_with_tz('Europe/Kyiv') def test_variable_tzname(self): t0 = datetime.datetime(1984, 1, 1, tzinfo=datetime.timezone.utc) t1 = utils.localtime(t0) + if t1.tzname() in ('Europe', 'UTC'): + self.skipTest("Can't find a Kyiv timezone database") self.assertEqual(t1.tzname(), 'MSK') t0 = datetime.datetime(1994, 1, 1, tzinfo=datetime.timezone.utc) t1 = utils.localtime(t0) _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
