test a fetchone() with no rows
(self)
| 257 | # self.assertEqual(r, c.description) |
| 258 | |
| 259 | def test_fetch_no_result(self): |
| 260 | """test a fetchone() with no rows""" |
| 261 | conn = self.connect() |
| 262 | c = conn.cursor() |
| 263 | c.execute("create table test_nr (b varchar(32))") |
| 264 | try: |
| 265 | data = "pymysql" |
| 266 | c.execute("insert into test_nr (b) values (%s)", (data,)) |
| 267 | self.assertEqual(None, c.fetchone()) |
| 268 | finally: |
| 269 | c.execute("drop table test_nr") |
| 270 | |
| 271 | def test_aggregates(self): |
| 272 | """test aggregate functions""" |