MCPcopy Create free account
hub / github.com/PyMySQL/PyMySQL / test_fetch_no_result

Method test_fetch_no_result

pymysql/tests/test_basic.py:259–269  ·  view source on GitHub ↗

test a fetchone() with no rows

(self)

Source from the content-addressed store, hash-verified

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"""

Callers

nothing calls this directly

Calls 4

cursorMethod · 0.80
executeMethod · 0.80
connectMethod · 0.45
fetchoneMethod · 0.45

Tested by

no test coverage detected