MCPcopy Index your code
hub / github.com/python/cpython / test_anydbm_creation

Method test_anydbm_creation

Lib/test/test_dbm.py:74–80  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

72 self.assertRaises(dbm.error, dbm.open, _fname)
73
74 def test_anydbm_creation(self):
75 f = dbm.open(_fname, 'c')
76 self.assertEqual(list(f.keys()), [])
77 for key in self._dict:
78 f[key.encode("ascii")] = self._dict[key]
79 self.read_helper(f)
80 f.close()
81
82 def test_anydbm_creation_n_file_exists_with_invalid_contents(self):
83 # create an empty file

Callers

nothing calls this directly

Calls 7

read_helperMethod · 0.95
listClass · 0.85
openMethod · 0.45
assertEqualMethod · 0.45
keysMethod · 0.45
encodeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected