diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-09-06 15:02:14 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-06-06 03:10:43 +0200 |
commit | c83b733454062a2fd714866da0489bfb97c445b0 (patch) | |
tree | 993414a744a6813b36acbe774d817ecf36493e07 | |
parent | Skip tests which interact with invalid UTF-8 files (diff) | |
download | cpython-c83b733454062a2fd714866da0489bfb97c445b0.tar.gz cpython-c83b733454062a2fd714866da0489bfb97c445b0.tar.bz2 cpython-c83b733454062a2fd714866da0489bfb97c445b0.zip |
Prevent tests from detecting our fake tzdata package
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 8bcd6d2e995..af53a6b7770 100644 --- a/Lib/test/test_zoneinfo/test_zoneinfo.py +++ b/Lib/test/test_zoneinfo/test_zoneinfo.py @@ -25,11 +25,8 @@ from test.support.import_helper import import_module, CleanImport 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 |