(self)
| 363 | |
| 364 | @tb.with_connection_options(record_class=CustomRecord) |
| 365 | async def test_record_subclass_01(self): |
| 366 | r = await self.con.fetchrow("SELECT 1 as a, '2' as b") |
| 367 | self.assertIsInstance(r, CustomRecord) |
| 368 | |
| 369 | r = await self.con.fetch("SELECT 1 as a, '2' as b") |
| 370 | self.assertIsInstance(r[0], CustomRecord) |
| 371 | |
| 372 | async with self.con.transaction(): |
| 373 | cur = await self.con.cursor("SELECT 1 as a, '2' as b") |
| 374 | r = await cur.fetchrow() |
| 375 | self.assertIsInstance(r, CustomRecord) |
| 376 | |
| 377 | cur = await self.con.cursor("SELECT 1 as a, '2' as b") |
| 378 | r = await cur.fetch(1) |
| 379 | self.assertIsInstance(r[0], CustomRecord) |
| 380 | |
| 381 | async with self.con.transaction(): |
| 382 | cur = self.con.cursor("SELECT 1 as a, '2' as b") |
| 383 | async for r in cur: |
| 384 | self.assertIsInstance(r, CustomRecord) |
| 385 | |
| 386 | ps = await self.con.prepare("SELECT 1 as a, '2' as b") |
| 387 | r = await ps.fetchrow() |
| 388 | self.assertIsInstance(r, CustomRecord) |
| 389 | |
| 390 | async def test_record_subclass_02(self): |
| 391 | r = await self.con.fetchrow( |
nothing calls this directly
no test coverage detected