MCPcopy
hub / github.com/psycopg/psycopg / test_nextset

Method test_nextset

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

Source from the content-addressed store, hash-verified

738 #cur.execute("drop procedure deleteme")
739
740 def test_nextset(self):
741 con = self._connect()
742 try:
743 cur = con.cursor()
744 if not hasattr(cur,'nextset'):
745 return
746
747 try:
748 self.executeDDL1(cur)
749 sql=self._populate()
750 for sql in self._populate():
751 cur.execute(sql)
752
753 self.help_nextset_setUp(cur)
754
755 cur.callproc('deleteme')
756 numberofrows=cur.fetchone()
757 assert numberofrows[0]== len(self.samples)
758 assert cur.nextset()
759 names=cur.fetchall()
760 assert len(names) == len(self.samples)
761 s=cur.nextset()
762 assert s is None, 'No more return sets, should return None'
763 finally:
764 self.help_nextset_tearDown(cur)
765
766 finally:
767 con.close()
768
769 def test_arraysize(self):
770 # Not much here - rest of the tests for this are in test_fetchmany

Callers

nothing calls this directly

Calls 11

_connectMethod · 0.95
executeDDL1Method · 0.95
_populateMethod · 0.95
help_nextset_setUpMethod · 0.95
help_nextset_tearDownMethod · 0.95
nextsetMethod · 0.80
cursorMethod · 0.45
executeMethod · 0.45
fetchoneMethod · 0.45
fetchallMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected