(self)
| 128 | |
| 129 | # Same complaint as for fetchall and fetchone |
| 130 | def test_rowcount(self): |
| 131 | con = self._connect() |
| 132 | try: |
| 133 | cur = con.cursor() |
| 134 | self.executeDDL1(cur) |
| 135 | # self.assertEqual(cur.rowcount,-1, |
| 136 | # 'cursor.rowcount should be -1 after executing no-result ' |
| 137 | # 'statements' |
| 138 | # ) |
| 139 | cur.execute( |
| 140 | "insert into %sbooze values ('Victoria Bitter')" % (self.table_prefix) |
| 141 | ) |
| 142 | # self.assertTrue(cur.rowcount in (-1,1), |
| 143 | # 'cursor.rowcount should == number or rows inserted, or ' |
| 144 | # 'set to -1 after executing an insert statement' |
| 145 | # ) |
| 146 | cur.execute("select name from %sbooze" % self.table_prefix) |
| 147 | self.assertTrue( |
| 148 | cur.rowcount in (-1, 1), |
| 149 | "cursor.rowcount should == number of rows returned, or " |
| 150 | "set to -1 after executing a select statement", |
| 151 | ) |
| 152 | self.executeDDL2(cur) |
| 153 | # self.assertEqual(cur.rowcount,-1, |
| 154 | # 'cursor.rowcount not being reset to -1 after executing ' |
| 155 | # 'no-result statements' |
| 156 | # ) |
| 157 | finally: |
| 158 | con.close() |
| 159 | |
| 160 | def test_callproc(self): |
| 161 | pass # performed in test_MySQL_capabilities |
nothing calls this directly
no test coverage detected