Back to index

python3.2  3.2.2
Public Member Functions
test.test_warnings.BaseTest Class Reference
Inheritance diagram for test.test_warnings.BaseTest:
Inheritance graph

List of all members.

Public Member Functions

def setUp
def tearDown

Detailed Description

Basic bookkeeping required for testing.

Definition at line 43 of file

Member Function Documentation

Definition at line 47 of file

00048     def setUp(self):
00049         # The __warningregistry__ needs to be in a pristine state for tests
00050         # to work properly.
00051         if '__warningregistry__' in globals():
00052             del globals()['__warningregistry__']
00053         if hasattr(warning_tests, '__warningregistry__'):
00054             del warning_tests.__warningregistry__
00055         if hasattr(sys, '__warningregistry__'):
00056             del sys.__warningregistry__
00057         # The 'warnings' module must be explicitly set so that the proper
00058         # interaction between _warnings and 'warnings' can be controlled.
00059         sys.modules['warnings'] = self.module
00060         super(BaseTest, self).setUp()

Here is the caller graph for this function:

Definition at line 61 of file

00062     def tearDown(self):
00063         sys.modules['warnings'] = original_warnings
00064         super(BaseTest, self).tearDown()

Here is the caller graph for this function:

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