Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ import_module
Method
import_module
Lib/test/test_import/__init__.py:1385–1388 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
1383
rmtree(self.dir_name)
1384
1385
def
import_module(self):
1386
ns = globals()
1387
__import__(self.module_name, ns, ns)
1388
return
sys.modules[self.module_name]
1389
1390
def
test_basics(self):
1391
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
_get_sysconfigdata
Function · 0.45
test_wmi.py
File · 0.45
test_half_float
Method · 0.45
test_select_unbuffered
Method · 0.45
test_multiprocessing_exceptions
Method · 0.45
test_syslog.py
File · 0.45
set_break
Method · 0.45
test_name_resolution
Method · 0.45
Calls
2
globals
Function · 0.85
__import__
Function · 0.50
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_half_float
Method · 0.36
test_select_unbuffered
Method · 0.36
test_multiprocessing_exceptions
Method · 0.36
set_break
Method · 0.36
test_name_resolution
Method · 0.36
test_iter_importers
Method · 0.36
test_disallow_instantiation
Method · 0.36
test_newempty
Method · 0.36