MCPcopy
hub / github.com/PyMySQL/PyMySQL / test_ok_and_next

Method test_ok_and_next

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

Source from the content-addressed store, hash-verified

41 self.assertEqual([], cur.fetchall())
42
43 def test_ok_and_next(self):
44 cur = self.connect(client_flag=CLIENT.MULTI_STATEMENTS).cursor()
45 cur.execute("SELECT 1; commit; SELECT 2;")
46 self.assertEqual([(1,)], list(cur))
47 self.assertTrue(cur.nextset())
48 self.assertTrue(cur.nextset())
49 self.assertEqual([(2,)], list(cur))
50 self.assertFalse(bool(cur.nextset()))
51
52 @pytest.mark.xfail
53 def test_multi_cursor(self):

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