Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
test.test_dbm_ndbm.DbmTestCase Class Reference

List of all members.

Public Member Functions

def setUp
def tearDown
def test_keys
def test_modes

Public Attributes

 filename
 d

Detailed Description

Definition at line 9 of file test_dbm_ndbm.py.


Member Function Documentation

Definition at line 11 of file test_dbm_ndbm.py.

00011 
00012     def setUp(self):
00013         self.filename = support.TESTFN
00014         self.d = dbm.ndbm.open(self.filename, 'c')
00015         self.d.close()

Here is the caller graph for this function:

Definition at line 16 of file test_dbm_ndbm.py.

00016 
00017     def tearDown(self):
00018         for suffix in ['', '.pag', '.dir', '.db']:
00019             support.unlink(self.filename + suffix)

Here is the caller graph for this function:

Definition at line 20 of file test_dbm_ndbm.py.

00020 
00021     def test_keys(self):
00022         self.d = dbm.ndbm.open(self.filename, 'c')
00023         self.assertTrue(self.d.keys() == [])
00024         self.d['a'] = 'b'
00025         self.d[b'bytes'] = b'data'
00026         self.d['12345678910'] = '019237410982340912840198242'
00027         self.d.keys()
00028         self.assertIn(b'a', self.d)
00029         self.assertEqual(self.d[b'bytes'], b'data')
00030         self.d.close()

Here is the call graph for this function:

Definition at line 31 of file test_dbm_ndbm.py.

00031 
00032     def test_modes(self):
00033         for mode in ['r', 'rw', 'w', 'n']:
00034             try:
00035                 self.d = dbm.ndbm.open(self.filename, mode)
00036                 self.d.close()
00037             except error:
00038                 self.fail()

Here is the call graph for this function:


Member Data Documentation

Definition at line 13 of file test_dbm_ndbm.py.

Definition at line 12 of file test_dbm_ndbm.py.


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