MCPcopy
hub / github.com/PyMySQL/PyMySQL / test_multi_cursor

Method test_multi_cursor

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

Source from the content-addressed store, hash-verified

51
52 @pytest.mark.xfail
53 def test_multi_cursor(self):
54 con = self.connect(client_flag=CLIENT.MULTI_STATEMENTS)
55 cur1 = con.cursor()
56 cur2 = con.cursor()
57
58 cur1.execute("SELECT 1; SELECT 2;")
59 cur2.execute("SELECT 42")
60
61 self.assertEqual([(1,)], list(cur1))
62 self.assertEqual([(42,)], list(cur2))
63
64 r = cur1.nextset()
65 self.assertTrue(r)
66
67 self.assertEqual([(2,)], list(cur1))
68 self.assertIsNone(cur1.nextset())
69
70 def test_multi_statement_warnings(self):
71 con = self.connect(

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