(self)
| 312 | del stmt |
| 313 | |
| 314 | async def test_prepare_16_command_result(self): |
| 315 | async def status(query): |
| 316 | stmt = await self.con.prepare(query) |
| 317 | await stmt.fetch() |
| 318 | return stmt.get_statusmsg() |
| 319 | |
| 320 | try: |
| 321 | self.assertEqual( |
| 322 | await status('CREATE TABLE mytab (a int)'), |
| 323 | 'CREATE TABLE') |
| 324 | |
| 325 | self.assertEqual( |
| 326 | await status('INSERT INTO mytab (a) VALUES (1), (2)'), |
| 327 | 'INSERT 0 2') |
| 328 | |
| 329 | self.assertEqual( |
| 330 | await status('SELECT a FROM mytab'), |
| 331 | 'SELECT 2') |
| 332 | |
| 333 | self.assertEqual( |
| 334 | await status('UPDATE mytab SET a = 3 WHERE a = 1'), |
| 335 | 'UPDATE 1') |
| 336 | finally: |
| 337 | self.assertEqual( |
| 338 | await status('DROP TABLE mytab'), |
| 339 | 'DROP TABLE') |
| 340 | |
| 341 | async def test_prepare_17_stmt_closed_lru(self): |
| 342 | st = await self.con.prepare('SELECT 1') |
nothing calls this directly
no outgoing calls
no test coverage detected