mirror of
https://github.com/python/cpython.git
synced 2025-10-19 16:03:42 +00:00
gh-118761: Add test_lazy_import for more modules (#133057)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
parent
b1aa515bd6
commit
cae660d6dc
20 changed files with 139 additions and 11 deletions
|
@ -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
|
||||
|
||||
|
@ -120,6 +120,10 @@ def tearDown(self):
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue