def CheckBool(self):
        self.cur.execute('create table test(a bool)')
        self.cur.execute('insert into test(a) values (?)', True)
        self.cur.execute('insert into test(a) values (?)', False)
        self.cur.execute('insert into test(a) values (1)')
        self.cur.execute('insert into test(a) values (0)')
        self.cur.execute('insert into test(a) values (100)')
        self.cur.execute('select * from test')
        r = self.cur.fetchone()
        self.assertEqual(r[0], True,
                         "Value is is %s, it should be True."  %r[0])
        self.assertEqual(type(r[0]), bool,
                         "Type is is %s, it should be <bool>."  %type(r[0]))
        r = self.cur.fetchone()
        self.assertEqual(r[0], False,
                         'Value is is %s, it should be False.'  %r[0])
        self.assertEqual(type(r[0]), bool,
                         "Type is is %s, it should be <bool>."  %type(r[0]))
        r = self.cur.fetchone()
        self.assertEqual(r[0], True,
                         "Value is is %s, it should be True."  %r[0])
        self.assertEqual(type(r[0]), bool,
                         "Type is is %s, it should be <bool>."  %type(r[0]))
        r = self.cur.fetchone()
        self.assertEqual(r[0], False,
                         'Value is is %s, it should be False.'  %r[0])
        self.assertEqual(type(r[0]), bool,
                         "Type is is %s, it should be <bool>."  %type(r[0]))
        r = self.cur.fetchone()
        self.assertEqual(r[0], True,
                         "Value is is %s, it should be True."  %r[0])
        self.assertEqual(type(r[0]), bool,
                         "Type is is %s, it should be <bool>."  %type(r[0]))
Test whether a Bool is returned when expected.
dataset/ETHPy150Open sassoftware/conary/conary/pysqlite3/test/api_tests.py/moduleTestCases.CheckBool