Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ import_module
Method
import_module
Lib/test/test_import/__init__.py:1427–1430 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
1425
rmtree(self.dir_name)
1426
1427
def
import_module(self):
1428
ns = globals()
1429
__import__(self.module_name, ns, ns)
1430
return
sys.modules[self.module_name]
1431
1432
def
test_basics(self):
1433
mod = self.import_module()
Callers
15
test_basics
Method · 0.95
test_incorrect_code_name
Method · 0.95
test_module_without_source
Method · 0.95
test_foreign_code
Method · 0.95
test_expanduser_posix
Method · 0.45
__init__.py
File · 0.45
test_dataclass_slot_dict_ctype
Method · 0.45
import_or_skip
Function · 0.45
test_getfullargspec_builtin_func
Method · 0.45
test_getfullargspec_builtin_func_no_signature
Method · 0.45
test_signature_on_builtins
Method · 0.45
test_signature_on_decorated_builtins
Method · 0.45
Calls
1
__import__
Function · 0.85
Tested by
15
test_basics
Method · 0.76
test_incorrect_code_name
Method · 0.76
test_module_without_source
Method · 0.76
test_foreign_code
Method · 0.76
test_expanduser_posix
Method · 0.36
test_dataclass_slot_dict_ctype
Method · 0.36
test_getfullargspec_builtin_func
Method · 0.36
test_getfullargspec_builtin_func_no_signature
Method · 0.36
test_signature_on_builtins
Method · 0.36
test_signature_on_decorated_builtins
Method · 0.36
test_signature_on_builtins_no_signature
Method · 0.36
test_signature_parsing_with_defaults
Method · 0.36