# and test that we can find it
self.assertIn(b"1", f)
# and read it
- self.assertTrue(f[b"1"] == b"1")
+ self.assertEqual(f[b"1"], b"1")
f.close()
self.assertEqual(name, self.dbm.whichdb(_fname))
self.g['x'] = 'x' * 10000
size1 = os.path.getsize(filename)
- self.assertTrue(size0 < size1)
+ self.assertGreater(size1, size0)
del self.g['x']
# 'size' is supposed to be the same even after deleting an entry.
self.g.reorganize()
size2 = os.path.getsize(filename)
- self.assertTrue(size1 > size2 >= size0)
+ self.assertLess(size2, size1)
+ self.assertGreaterEqual(size2, size0)
def test_context_manager(self):
with gdbm.open(filename, 'c') as db: