Skip to content
3 changes: 3 additions & 0 deletions Lib/test/test_pathlib/test_pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ class StrSubclass(str):
for part in p.parts:
self.assertIs(type(part), str)

def test_lazy_import(self):
import_helper.ensure_lazy_imports("pathlib", {"shutil"})

def test_str_subclass_common(self):
self._check_str_subclass('')
self._check_str_subclass('.')
Expand Down
5 changes: 4 additions & 1 deletion Lib/test/test_threading.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import test.support
from test.support import threading_helper, requires_subprocess, requires_gil_enabled
from test.support import verbose, cpython_only, os_helper
from test.support.import_helper import import_module
from test.support.import_helper import ensure_lazy_imports, import_module
from test.support.script_helper import assert_python_ok, assert_python_failure
from test.support import force_not_colorized

Expand Down Expand Up @@ -120,6 +120,9 @@ def tearDown(self):
class ThreadTests(BaseTestCase):
maxDiff = 9999

def test_lazy_import(self):
ensure_lazy_imports("threading", {"functools", "warnings"})

@cpython_only
def test_name(self):
def func(): pass
Expand Down
Loading