mirror of
https://github.com/python/cpython.git
synced 2025-08-31 22:18:28 +00:00
Use more specific asserts in dbm tests. (GH-7786)
This may help to investigate bpo-33901.
This commit is contained in:
parent
fc93bd467e
commit
22525de737
2 changed files with 4 additions and 3 deletions
|
@ -74,7 +74,7 @@ class TestGdbm(unittest.TestCase):
|
|||
|
||||
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.
|
||||
|
@ -82,7 +82,8 @@ class TestGdbm(unittest.TestCase):
|
|||
|
||||
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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue