(self)
| 313 | con.close() |
| 314 | |
| 315 | def test_rowcount(self): |
| 316 | con = self._connect() |
| 317 | try: |
| 318 | cur = con.cursor() |
| 319 | self.executeDDL1(cur) |
| 320 | self.assertEqual(cur.rowcount,-1, |
| 321 | 'cursor.rowcount should be -1 after executing no-result ' |
| 322 | 'statements' |
| 323 | ) |
| 324 | cur.execute("insert into %sbooze values ('Victoria Bitter')" % ( |
| 325 | self.table_prefix |
| 326 | )) |
| 327 | self.assertTrue(cur.rowcount in (-1,1), |
| 328 | 'cursor.rowcount should == number or rows inserted, or ' |
| 329 | 'set to -1 after executing an insert statement' |
| 330 | ) |
| 331 | cur.execute("select name from %sbooze" % self.table_prefix) |
| 332 | self.assertTrue(cur.rowcount in (-1,1), |
| 333 | 'cursor.rowcount should == number of rows returned, or ' |
| 334 | 'set to -1 after executing a select statement' |
| 335 | ) |
| 336 | self.executeDDL2(cur) |
| 337 | self.assertEqual(cur.rowcount,-1, |
| 338 | 'cursor.rowcount not being reset to -1 after executing ' |
| 339 | 'no-result statements' |
| 340 | ) |
| 341 | finally: |
| 342 | con.close() |
| 343 | |
| 344 | lower_func = 'lower' |
| 345 | def test_callproc(self): |
nothing calls this directly
no test coverage detected