Skip to content

Commit 20bdeed

Browse files
tirkarthinmaynes
andauthored
[3.9] bpo-41371: Handle lzma lib import error in test_zoneinfo.py (GH-21734) (GH-22039)
(cherry picked from commit 5f0769a) Co-authored-by: Nathan M <[email protected]>
1 parent 1f75fc7 commit 20bdeed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_zoneinfo/test_zoneinfo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import importlib.metadata
77
import io
88
import json
9-
import lzma
109
import os
1110
import pathlib
1211
import pickle
@@ -20,7 +19,9 @@
2019

2120
from . import _support as test_support
2221
from ._support import OS_ENV_LOCK, TZPATH_TEST_LOCK, ZoneInfoTestBase
22+
from test.support import import_module
2323

24+
lzma = import_module('lzma')
2425
py_zoneinfo, c_zoneinfo = test_support.get_modules()
2526

2627
try:

0 commit comments

Comments
 (0)