(self)
| 72 | "DBM object has already been closed") |
| 73 | |
| 74 | def test_bytes(self): |
| 75 | with dbm.ndbm.open(self.filename, 'c') as db: |
| 76 | db[b'bytes key \xbd'] = b'bytes value \xbd' |
| 77 | with dbm.ndbm.open(self.filename, 'r') as db: |
| 78 | self.assertEqual(list(db.keys()), [b'bytes key \xbd']) |
| 79 | self.assertTrue(b'bytes key \xbd' in db) |
| 80 | self.assertEqual(db[b'bytes key \xbd'], b'bytes value \xbd') |
| 81 | |
| 82 | def test_unicode(self): |
| 83 | with dbm.ndbm.open(self.filename, 'c') as db: |
nothing calls this directly
no test coverage detected