PyDocs

Development Tools

test.support.import_helper

The test.support.import_helper module provides support for import tests.
Symbols in test.support.import_helper

c

CleanImport
A context manager to force import to return a new module reference.

d

DirsOnSysPath
A context manager to temporarily add directories to sys.path.

f

forget
Remove the module named module_name from sys.modules and delete any byte-compiled files of the module.

i

import_fresh_module
This function imports and returns a fresh copy of the named Python module by removing the named module from sys.modules before doing the import.
import_module
This function imports and returns the named module.

m

make_legacy_pyc
Move a PEP 3147/PEP 488 pyc file to its legacy pyc location and return the file system path to the legacy pyc file.
modules_cleanup
Remove modules except for oldmodules and encodings in order to preserve internal cache.
modules_setup
Return a copy of sys.modules.

u

unload
Delete name from sys.modules.