(self)
| 205 | ]) |
| 206 | |
| 207 | async def test_executemany_bad_input(self): |
| 208 | with self.assertRaisesRegex( |
| 209 | exceptions.DataError, |
| 210 | r"invalid input in executemany\(\) argument sequence element #1: " |
| 211 | r"expected a sequence", |
| 212 | ): |
| 213 | await self.con.executemany(''' |
| 214 | INSERT INTO exmany (b) VALUES($1) |
| 215 | ''', [(0,), {1: 0}]) |
| 216 | |
| 217 | with self.assertRaisesRegex( |
| 218 | exceptions.DataError, |
| 219 | r"invalid input for query argument \$1 in element #1 of " |
| 220 | r"executemany\(\) sequence: 'bad'", |
| 221 | ): |
| 222 | await self.con.executemany(''' |
| 223 | INSERT INTO exmany (b) VALUES($1) |
| 224 | ''', [(0,), ("bad",)]) |
| 225 | |
| 226 | async def test_executemany_error_in_input_gen(self): |
| 227 | bad_data = ([1 / 0] for v in range(10)) |
nothing calls this directly
no test coverage detected