Commit 1261bfa8 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-33901: Fix test_dbm_gnu for gdbm 1.15 (GH-7791)

Using gdbm 1.15, creating a database creates a file of 16 MiB. Adding
a small entry and then modifying the small entry doesn't change the
file size. Modify test_dbm_gnu to be less strict: allow that the file
size doesn't change.
parent 22525de7
......@@ -74,7 +74,7 @@ class TestGdbm(unittest.TestCase):
self.g['x'] = 'x' * 10000
size1 = os.path.getsize(filename)
self.assertGreater(size1, size0)
self.assertGreaterEqual(size1, size0)
del self.g['x']
# 'size' is supposed to be the same even after deleting an entry.
......@@ -82,7 +82,7 @@ class TestGdbm(unittest.TestCase):
self.g.reorganize()
size2 = os.path.getsize(filename)
self.assertLess(size2, size1)
self.assertLessEqual(size2, size1)
self.assertGreaterEqual(size2, size0)
def test_context_manager(self):
......
Fix test_dbm_gnu for gdbm 1.15. Using gdbm 1.15, creating a database creates
a file of 16 MiB. Adding a small entry and then modifying the small entry
doesn't change the file size. Modify test_dbm_gnu to be less strict: allow
that the file size doesn't change.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment