MCPcopy Index your code
hub / github.com/davispuh/MySQL-for-Python-3 / test_callproc

Method test_callproc

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

Source from the content-addressed store, hash-verified

329
330 lower_func = 'lower'
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,
342 'callproc produced invalid result set'
343 )
344 self.assertEqual(r[0][0],'foo',
345 'callproc produced invalid results'
346 )
347 finally:
348 con.close()
349
350 def test_close(self):
351 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