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):
160160 # and test that we can find it
161161 self .assertIn (b"1" , f )
162162 # and read it
163- self .assertTrue (f [b"1" ] == b"1" )
163+ self .assertEqual (f [b"1" ], b"1" )
164164 f .close ()
165165 self .assertEqual (name , self .dbm .whichdb (_fname ))
166166
Original file line number Diff line number Diff line change @@ -74,15 +74,16 @@ def test_reorganize(self):
7474
7575 self .g ['x' ] = 'x' * 10000
7676 size1 = os .path .getsize (filename )
77- self .assertTrue ( size0 < size1 )
77+ self .assertGreater ( size1 , size0 )
7878
7979 del self .g ['x' ]
8080 # 'size' is supposed to be the same even after deleting an entry.
8181 self .assertEqual (os .path .getsize (filename ), size1 )
8282
8383 self .g .reorganize ()
8484 size2 = os .path .getsize (filename )
85- self .assertTrue (size1 > size2 >= size0 )
85+ self .assertLess (size2 , size1 )
86+ self .assertGreaterEqual (size2 , size0 )
8687
8788 def test_context_manager (self ):
8889 with gdbm .open (filename , 'c' ) as db :
You can’t perform that action at this time.
0 commit comments