MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_anydbm_access

Method test_anydbm_access

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

Source from the content-addressed store, hash-verified

129 f.close()
130
131 def test_anydbm_access(self):
132 self.init_db()
133 f = dbm.open(_fname, 'r')
134 key = "a".encode("ascii")
135 self.assertIn(key, f)
136 assert(f[key] == b"Python:")
137 f.close()
138
139 def test_open_with_bytes(self):
140 dbm.open(os.fsencode(_fname), "c").close()

Callers

nothing calls this directly

Calls 5

init_dbMethod · 0.95
assertInMethod · 0.80
openMethod · 0.45
encodeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected