ID EN
Unittest

enterModuleContext

Python 3.11

Enter the supplied context manager. If successful, also add its __exit__() method as a cleanup function by addModuleCleanup() and return the result of the __enter__() method.

Syntax

PYTHON
classmethod unittest.enterModuleContext(cm)

See Also

context manager __exit__() addModuleCleanup() __enter__()