Back to index

python3.2  3.2.2
Classes | Functions | Variables
test.test_dbm Namespace Reference

Classes

class  AnyDBMTestCase
class  WhichDBTestCase

Functions

def dbm_iterator
def delete_files
def test_main

Variables

tuple dbm = test.support.import_module('dbm')
 _fname = test.support.TESTFN

Function Documentation

Definition at line 18 of file test_dbm.py.

00018 
00019 def dbm_iterator():
00020     for name in dbm._names:
00021         try:
00022             mod = __import__(name, fromlist=['open'])
00023         except ImportError:
00024             continue
00025         dbm._modules[name] = mod
00026         yield mod
00027 
00028 #
00029 # Clean up all scratch databases we might have created during testing
#

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 30 of file test_dbm.py.

00030 
00031 def delete_files():
00032     # we don't know the precise name the underlying database uses
00033     # so we use glob to locate all names
00034     for f in glob.glob(_fname + "*"):
00035         test.support.unlink(f)
00036 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 172 of file test_dbm.py.

00172 
00173 def test_main():
00174     classes = [WhichDBTestCase]
00175     for mod in dbm_iterator():
00176         classes.append(type("TestCase-" + mod.__name__, (AnyDBMTestCase,),
00177                             {'module': mod}))
00178     test.support.run_unittest(*classes)

Here is the call graph for this function:


Variable Documentation

Definition at line 12 of file test_dbm.py.

Definition at line 10 of file test_dbm.py.