test binary data
(self)
| 135 | c.execute("drop table test_dict") |
| 136 | |
| 137 | def test_binary(self): |
| 138 | """test binary data""" |
| 139 | data = bytes(bytearray(range(255))) |
| 140 | conn = self.connect() |
| 141 | self.safe_create_table( |
| 142 | conn, "test_binary", "create table test_binary (b binary(255))" |
| 143 | ) |
| 144 | |
| 145 | with conn.cursor() as c: |
| 146 | c.execute("insert into test_binary (b) values (_binary %s)", (data,)) |
| 147 | c.execute("select b from test_binary") |
| 148 | self.assertEqual(data, c.fetchone()[0]) |
| 149 | |
| 150 | def test_blob(self): |
| 151 | """test blob data""" |
nothing calls this directly
no test coverage detected