diff --git a/Lib/bsddb/test/test_basics.py b/Lib/bsddb/test/test_basics.py index 8c44503c8dd..3c57be4fe3b 100644 --- a/Lib/bsddb/test/test_basics.py +++ b/Lib/bsddb/test/test_basics.py @@ -68,13 +68,13 @@ class BasicTestCase(unittest.TestCase): # create and open the DB self.d = db.DB(self.env) if not self.useEnv : - self.d.set_cachesize(*self.cachesize) - cachesize = self.d.get_cachesize() - self.assertEqual(cachesize[0], self.cachesize[0]) - self.assertEqual(cachesize[2], self.cachesize[2]) - # Berkeley DB expands the cache 25% accounting overhead, - # if the cache is small. - self.assertEqual(125, int(100.0*cachesize[1]/self.cachesize[1])) + self.d.set_cachesize(*self.cachesize) + cachesize = self.d.get_cachesize() + self.assertEqual(cachesize[0], self.cachesize[0]) + self.assertEqual(cachesize[2], self.cachesize[2]) + # Berkeley DB expands the cache 25% accounting overhead, + # if the cache is small. + self.assertEqual(125, int(100.0*cachesize[1]/self.cachesize[1])) self.d.set_flags(self.dbsetflags) if self.dbname: self.d.open(self.filename, self.dbname, self.dbtype, diff --git a/Lib/bsddb/test/test_db.py b/Lib/bsddb/test/test_db.py index 98705fe940a..2bc109f1fc7 100644 --- a/Lib/bsddb/test/test_db.py +++ b/Lib/bsddb/test/test_db.py @@ -63,28 +63,28 @@ class DB_general(DB) : self.assertFalse(self.db.get_transactional()) class DB_hash(DB) : - def test_h_ffactor(self) : - for ffactor in [4, 16, 256] : - self.db.set_h_ffactor(ffactor) - self.assertEqual(ffactor, self.db.get_h_ffactor()) + def test_h_ffactor(self) : + for ffactor in [4, 16, 256] : + self.db.set_h_ffactor(ffactor) + self.assertEqual(ffactor, self.db.get_h_ffactor()) - def test_h_nelem(self) : - for nelem in [1, 2, 4] : - nelem = nelem*1024*1024 # Millions - self.db.set_h_nelem(nelem) - self.assertEqual(nelem, self.db.get_h_nelem()) + def test_h_nelem(self) : + for nelem in [1, 2, 4] : + nelem = nelem*1024*1024 # Millions + self.db.set_h_nelem(nelem) + self.assertEqual(nelem, self.db.get_h_nelem()) - def test_pagesize(self) : - for i in xrange(9, 17) : # From 512 to 65536 - i = 1<