Skip to content

Commit 43a38cf

Browse files
committed
gh-109017: Use non alternate name for Kyiv
tzdata provides Kiev as an alternative to Kyiv: https://sources.debian.org/src/tzdata/2023c-10/backward/?hl=314#L314 But Debian moved it to the tzdata-legacy package breaking the test: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050530 This patch switches to the name provided by tzdata. Also check that the new name is actually available.
1 parent 0c139b5 commit 43a38cf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/test/test_email/test_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ def test_localtime_epoch_notz_daylight_false(self):
145145
# XXX: Need a more robust test for Olson's tzdata
146146
@unittest.skipIf(sys.platform.startswith('win'),
147147
"Windows does not use Olson's TZ database")
148-
@unittest.skipUnless(os.path.exists('/usr/share/zoneinfo') or
149-
os.path.exists('/usr/lib/zoneinfo'),
150-
"Can't find the Olson's TZ database")
151-
@test.support.run_with_tz('Europe/Kiev')
148+
@unittest.skipUnless(os.path.exists('/usr/share/zoneinfo/Europe/Kyiv') or
149+
os.path.exists('/usr/lib/zoneinfo/Europe/Kyiv'),
150+
"Can't find a recent Olson's TZ database")
151+
@test.support.run_with_tz('Europe/Kyiv')
152152
def test_variable_tzname(self):
153153
t0 = datetime.datetime(1984, 1, 1, tzinfo=datetime.timezone.utc)
154154
t1 = utils.localtime(t0)

0 commit comments

Comments
 (0)