Back to index

python3.2  3.2.2
Public Member Functions
test.test_imp.ReloadTests Class Reference

List of all members.

Public Member Functions

def test_source
def test_extension
def test_builtin

Detailed Description

Very basic tests to make sure that imp.reload() operates just like

Definition at line 179 of file

Member Function Documentation

Definition at line 201 of file

00202     def test_builtin(self):
00203         with support.CleanImport('marshal'):
00204             import marshal
00205             imp.reload(marshal)

Definition at line 196 of file

00197     def test_extension(self):
00198         with support.CleanImport('time'):
00199             import time
00200             imp.reload(time)

Definition at line 184 of file

00185     def test_source(self):
00186         # XXX (ncoghlan): It would be nice to use
00187         # here, but that breaks because the os module registers some
00188         # handlers in copy_reg on import. Since CleanImport doesn't
00189         # revert that registration, the module is left in a broken
00190         # state after reversion. Reinitialising the module contents
00191         # and just reverting os.environ to its previous state is an OK
00192         # workaround
00193         with support.EnvironmentVarGuard():
00194             import os
00195             imp.reload(os)

The documentation for this class was generated from the following file: