diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-09-06 15:02:14 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-09-06 15:02:14 +0200 |
commit | 2beecf16878bafb594abaa3f19a36b8df4519195 (patch) | |
tree | 1f87f91d53f9440e0b754612fe78eb6a174a3818 | |
parent | Skip tests which interact with invalid UTF-8 files (diff) | |
download | cpython-2beecf16878bafb594abaa3f19a36b8df4519195.tar.gz cpython-2beecf16878bafb594abaa3f19a36b8df4519195.tar.bz2 cpython-2beecf16878bafb594abaa3f19a36b8df4519195.zip |
Prevent tests from detecting our fake tzdata packagegentoo-3.12.0rc2_p1gentoo-3.12.0rc1_p6_p1
Tests from test_zoneinfo assume that if `tzdata` package is installed,
it provides standalone timezone data. Our `tzdata` package is just
a shim, so force falsify that assumption.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r-- | Lib/test/test_zoneinfo/test_zoneinfo.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/test/test_zoneinfo/test_zoneinfo.py b/Lib/test/test_zoneinfo/test_zoneinfo.py index ae921f7432c..d3612f1d167 100644 --- a/Lib/test/test_zoneinfo/test_zoneinfo.py +++ b/Lib/test/test_zoneinfo/test_zoneinfo.py @@ -24,11 +24,8 @@ from test.support.import_helper import import_module lzma = import_module('lzma') py_zoneinfo, c_zoneinfo = test_support.get_modules() -try: - importlib.metadata.metadata("tzdata") - HAS_TZDATA_PKG = True -except importlib.metadata.PackageNotFoundError: - HAS_TZDATA_PKG = False +# Gentoo installs a dummy `tzdata` package +HAS_TZDATA_PKG = False ZONEINFO_DATA = None ZONEINFO_DATA_V1 = None |