diff options
author | Daniel Hollas <daniel.hollas@bristol.ac.uk> | 2025-05-05 23:46:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-05 22:46:05 +0000 |
commit | cae660d6dc0d7ba3f66970ef2f2faf1b93869e91 (patch) | |
tree | b6eac99337845902bf11faa148c37fea83a3075c /Lib/test/test_threading.py | |
parent | b1aa515bd6b645202eda4ca07e85d92e19b1534d (diff) | |
download | cpython-cae660d6dc0d7ba3f66970ef2f2faf1b93869e91.tar.gz cpython-cae660d6dc0d7ba3f66970ef2f2faf1b93869e91.zip |
gh-118761: Add test_lazy_import for more modules (#133057)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Diffstat (limited to 'Lib/test/test_threading.py')
-rw-r--r-- | Lib/test/test_threading.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index 814c00ca0fd..4ab38c2598b 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -5,7 +5,7 @@ Tests for the threading module. 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 @@ -121,6 +121,10 @@ class ThreadTests(BaseTestCase): maxDiff = 9999 @cpython_only + def test_lazy_import(self): + ensure_lazy_imports("threading", {"functools", "warnings"}) + + @cpython_only def test_name(self): def func(): pass |