MCPcopy
hub / github.com/PyMySQL/PyMySQL / test_nextset

Method test_nextset

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

Source from the content-addressed store, hash-verified

7
8class TestNextset(base.PyMySQLTestCase):
9 def test_nextset(self):
10 con = self.connect(
11 init_command='SELECT "bar"; SELECT "baz"',
12 client_flag=CLIENT.MULTI_STATEMENTS,
13 )
14 cur = con.cursor()
15 cur.execute("SELECT 1; SELECT 2;")
16 self.assertEqual([(1,)], list(cur))
17
18 r = cur.nextset()
19 self.assertTrue(r)
20
21 self.assertEqual([(2,)], list(cur))
22 self.assertIsNone(cur.nextset())
23
24 def test_skip_nextset(self):
25 cur = self.connect(client_flag=CLIENT.MULTI_STATEMENTS).cursor()

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected