Skip to content

bpo-33901: Fix test_dbm_gnu for gdbm 1.15 #7791

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Lib/test/test_dbm_gnu.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ def test_reorganize(self):

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.
self.assertEqual(os.path.getsize(filename), size1)

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):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
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.