Skip to content

Commit e3f6b7f

Browse files
committed
fix: fix windows missing ModuleNotFoundError: No module named 'tzdata.zoneinfo'; 'tzdata' is not a package
1 parent f133a52 commit e3f6b7f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/test/test_zoneinfo/test_zoneinfo.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,6 +1551,10 @@ def __eq__(self, other):
15511551
except CustomError:
15521552
pass
15531553

1554+
@unittest.skipUnless(
1555+
lambda: any(os.path.exists(os.path.join(p, 'UTC')) for p in ZoneInfo.tzpath),
1556+
"timezone data not available"
1557+
)
15541558
def test_weak_cache_descriptor_use_after_free(self):
15551559
from zoneinfo import ZoneInfo
15561560

0 commit comments

Comments
 (0)