(self)
| 177 | |
| 178 | @unittest.expectedFailure # TODO: RUSTPYTHON _iterdump not implemented |
| 179 | def test_unorderable_row(self): |
| 180 | # iterdump() should be able to cope with unorderable row types (issue #15545) |
| 181 | class UnorderableRow: |
| 182 | def __init__(self, cursor, row): |
| 183 | self.row = row |
| 184 | def __getitem__(self, index): |
| 185 | return self.row[index] |
| 186 | self.cx.row_factory = UnorderableRow |
| 187 | CREATE_ALPHA = """CREATE TABLE "alpha" ("one");""" |
| 188 | CREATE_BETA = """CREATE TABLE "beta" ("two");""" |
| 189 | expected = [ |
| 190 | "BEGIN TRANSACTION;", |
| 191 | CREATE_ALPHA, |
| 192 | CREATE_BETA, |
| 193 | "COMMIT;" |
| 194 | ] |
| 195 | self.cu.execute(CREATE_BETA) |
| 196 | self.cu.execute(CREATE_ALPHA) |
| 197 | got = list(self.cx.iterdump()) |
| 198 | self.assertEqual(expected, got) |
| 199 | |
| 200 | @unittest.expectedFailure # TODO: RUSTPYTHON _iterdump not implemented |
| 201 | def test_dump_custom_row_factory(self): |
nothing calls this directly
no test coverage detected