MCPcopy
hub / github.com/PyMySQL/PyMySQL / test_nextset_error

Method test_nextset_error

pymysql/tests/test_nextset.py:32–41  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

30 self.assertEqual([(42,)], list(cur))
31
32 def test_nextset_error(self):
33 con = self.connect(client_flag=CLIENT.MULTI_STATEMENTS)
34 cur = con.cursor()
35
36 for i in range(3):
37 cur.execute("SELECT %s; xyzzy;", (i,))
38 self.assertEqual([(i,)], list(cur))
39 with self.assertRaises(pymysql.ProgrammingError):
40 cur.nextset()
41 self.assertEqual([], cur.fetchall())
42
43 def test_ok_and_next(self):
44 cur = self.connect(client_flag=CLIENT.MULTI_STATEMENTS).cursor()

Callers

nothing calls this directly

Calls 5

cursorMethod · 0.80
executeMethod · 0.80
connectMethod · 0.45
nextsetMethod · 0.45
fetchallMethod · 0.45

Tested by

no test coverage detected