| 82 | self.check_data_integrity(("col1 char(1)", "col2 char(1)"), generator) |
| 83 | |
| 84 | def test_BIT(self): |
| 85 | c = self.cursor |
| 86 | try: |
| 87 | c.execute( |
| 88 | """create table test_BIT ( |
| 89 | b3 BIT(3), |
| 90 | b7 BIT(10), |
| 91 | b64 BIT(64))""" |
| 92 | ) |
| 93 | |
| 94 | one64 = "1" * 64 |
| 95 | c.execute( |
| 96 | "insert into test_BIT (b3, b7, b64)" |
| 97 | " VALUES (b'011', b'1111111111', b'%s')" % one64 |
| 98 | ) |
| 99 | |
| 100 | c.execute("SELECT b3, b7, b64 FROM test_BIT") |
| 101 | row = c.fetchone() |
| 102 | self.assertEqual(row[0], b"\x03") |
| 103 | self.assertEqual(row[1], b"\x03\xff") |
| 104 | self.assertEqual(row[2], b"\xff" * 8) |
| 105 | finally: |
| 106 | c.execute("drop table if exists test_BIT") |
| 107 | |
| 108 | def test_MULTIPOLYGON(self): |
| 109 | c = self.cursor |