From: Nathan M Date: Thu, 6 Aug 2020 22:09:40 +0000 (-0400) Subject: bpo-41371: Handle lzma lib import error in test_zoneinfo.py (GH-21734) X-Git-Tag: v3.10.0a1~302 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5f0769a7529fcbc28190864f098f192053a10747;p=thirdparty%2FPython%2Fcpython.git bpo-41371: Handle lzma lib import error in test_zoneinfo.py (GH-21734) --- diff --git a/Lib/test/test_zoneinfo/test_zoneinfo.py b/Lib/test/test_zoneinfo/test_zoneinfo.py index 1f1fa60f1ffc..d16e0d2c3310 100644 --- a/Lib/test/test_zoneinfo/test_zoneinfo.py +++ b/Lib/test/test_zoneinfo/test_zoneinfo.py @@ -6,7 +6,6 @@ import dataclasses import importlib.metadata import io import json -import lzma import os import pathlib import pickle @@ -20,7 +19,9 @@ from functools import cached_property from . import _support as test_support from ._support import OS_ENV_LOCK, TZPATH_TEST_LOCK, ZoneInfoTestBase +from test.support.import_helper import import_module +lzma = import_module('lzma') py_zoneinfo, c_zoneinfo = test_support.get_modules() try: