File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ def test_whichdb(self):
160
160
# and test that we can find it
161
161
self .assertIn (b"1" , f )
162
162
# and read it
163
- self .assertTrue (f [b"1" ] == b"1" )
163
+ self .assertEqual (f [b"1" ], b"1" )
164
164
f .close ()
165
165
self .assertEqual (name , self .dbm .whichdb (_fname ))
166
166
Original file line number Diff line number Diff line change @@ -74,15 +74,16 @@ def test_reorganize(self):
74
74
75
75
self .g ['x' ] = 'x' * 10000
76
76
size1 = os .path .getsize (filename )
77
- self .assertTrue ( size0 < size1 )
77
+ self .assertGreater ( size1 , size0 )
78
78
79
79
del self .g ['x' ]
80
80
# 'size' is supposed to be the same even after deleting an entry.
81
81
self .assertEqual (os .path .getsize (filename ), size1 )
82
82
83
83
self .g .reorganize ()
84
84
size2 = os .path .getsize (filename )
85
- self .assertTrue (size1 > size2 >= size0 )
85
+ self .assertLess (size2 , size1 )
86
+ self .assertGreaterEqual (size2 , size0 )
86
87
87
88
def test_context_manager (self ):
88
89
with gdbm .open (filename , 'c' ) as db :
You can’t perform that action at this time.
0 commit comments