def test_pagesize(self):
    for i in range(9, 17):
        i = (1 << i)
        self.db.set_pagesize(i)
        self.assertEqual(i, self.db.get_pagesize())
    self.assertRaises(db.DBInvalidArgError, self.db.set_pagesize, (1 << 17))
    self.assertRaises(db.DBInvalidArgError, self.db.set_pagesize, (1 << 8))
def test_pagesize(self):
    for i in range(9, 17):
        i = (1 << i)
        self.db.set_pagesize(i)
        self.assertEqual(i, self.db.get_pagesize())
    self.assertRaises(db.DBInvalidArgError, self.db.set_pagesize, (1 << 17))
    self.assertRaises(db.DBInvalidArgError, self.db.set_pagesize, (1 << 8))