(self)
| 110 | super().tearDown() |
| 111 | |
| 112 | async def test_executemany_basic(self): |
| 113 | result = await self.con.executemany(''' |
| 114 | INSERT INTO exmany VALUES($1, $2) |
| 115 | ''', [ |
| 116 | ('a', 1), ('b', 2), ('c', 3), ('d', 4) |
| 117 | ]) |
| 118 | |
| 119 | self.assertIsNone(result) |
| 120 | |
| 121 | result = await self.con.fetch(''' |
| 122 | SELECT * FROM exmany |
| 123 | ''') |
| 124 | |
| 125 | self.assertEqual(result, [ |
| 126 | ('a', 1), ('b', 2), ('c', 3), ('d', 4) |
| 127 | ]) |
| 128 | |
| 129 | # Empty set |
| 130 | await self.con.executemany(''' |
| 131 | INSERT INTO exmany VALUES($1, $2) |
| 132 | ''', ()) |
| 133 | |
| 134 | result = await self.con.fetch(''' |
| 135 | SELECT * FROM exmany |
| 136 | ''') |
| 137 | |
| 138 | self.assertEqual(result, [ |
| 139 | ('a', 1), ('b', 2), ('c', 3), ('d', 4) |
| 140 | ]) |
| 141 | |
| 142 | async def test_executemany_returning(self): |
| 143 | result = await self.con.fetchmany(''' |
nothing calls this directly
no test coverage detected