def METHOD_NAME(self):
    self.g = gdbm.open(filename, 'c')
    size0 = os.path.getsize(filename)
    # bpo-33901: on macOS with gdbm 1.15, an empty database uses 16 MiB
    # and adding an entry of 10,000 B has no effect on the file size.
    # Add size0 bytes to make sure that the file size changes.
    value_size = max(size0, 10000)
    self.g['x'] = 'x' * value_size
    size1 = os.path.getsize(filename)
    self.assertGreater(size1, size0)
    del self.g['x']
    # 'size' is supposed to be the same even after deleting an entry.
    self.assertEqual(os.path.getsize(filename), size1)
    self.g.reorganize()
    size2 = os.path.getsize(filename)
    self.assertLess(size2, size1)
    self.assertGreaterEqual(size2, size0)