Skip to content

Commit c30af4d

Browse files
committed
Use Kyiv instead of Kiev
tzdata provides Kiev as an alternative to Kyiv, but Debian moved it to the tzdata-legacy package, breaking these tests. cPython also uses this timezone in test_email, and this was fixed in 3.11. I've left that patch out of here, it will get picked up when PyPy switches to 3.11 stdlib. python/cpython#109251
1 parent 55a4184 commit c30af4d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

pypy/module/time/test/test_time.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,12 @@ def test_localtime_timezone(self):
395395
import os, time
396396
if not os.name == "posix":
397397
skip("tzset available only under Unix")
398+
if not (os.path.exists('/usr/share/zoneinfo/Europe/Kyiv') or
399+
os.path.exists('/usr/lib/zoneinfo/Europe/Kyiv')):
400+
skip("Kyiv timezone unavailable")
398401
org_TZ = os.environ.get('TZ', None)
399402
try:
400-
os.environ['TZ'] = 'Europe/Kiev'
403+
os.environ['TZ'] = 'Europe/Kyiv'
401404
time.tzset()
402405
localtm = time.localtime(0)
403406
assert localtm.tm_zone == "MSK"

0 commit comments

Comments
 (0)