MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_unorderable_row

Method test_unorderable_row

Lib/test/test_sqlite3/test_dump.py:179–198  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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):

Callers

nothing calls this directly

Calls 4

listClass · 0.85
iterdumpMethod · 0.80
executeMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected