MCPcopy Index your code
hub / github.com/PyMySQL/mysqlclient / test_callproc

Method test_callproc

tests/dbapi20.py:331–344  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

329 lower_func = "lower"
330
331 def test_callproc(self):
332 con = self._connect()
333 try:
334 cur = con.cursor()
335 if self.lower_func and hasattr(cur, "callproc"):
336 r = cur.callproc(self.lower_func, ("FOO",))
337 self.assertEqual(len(r), 1)
338 self.assertEqual(r[0], "FOO")
339 r = cur.fetchall()
340 self.assertEqual(len(r), 1, "callproc produced no result set")
341 self.assertEqual(len(r[0]), 1, "callproc produced invalid result set")
342 self.assertEqual(r[0][0], "foo", "callproc produced invalid results")
343 finally:
344 con.close()
345
346 def test_close(self):
347 con = self._connect()

Callers

nothing calls this directly

Calls 5

_connectMethod · 0.95
cursorMethod · 0.80
callprocMethod · 0.80
closeMethod · 0.80
fetchallMethod · 0.45

Tested by

no test coverage detected