MCPcopy Create free account
hub / github.com/PyMySQL/PyMySQL / test_cleanup_rows_unbuffered

Method test_cleanup_rows_unbuffered

pymysql/tests/test_cursor.py:60–75  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

58 self.assertEqual(cursor.__next__(), ("row1",))
59
60 def test_cleanup_rows_unbuffered(self):
61 conn = self.test_connection
62 cursor = conn.cursor(pymysql.cursors.SSCursor)
63
64 cursor.execute("select * from test as t1, test as t2")
65 for counter, row in enumerate(cursor):
66 if counter > 10:
67 break
68
69 del cursor
70
71 c2 = conn.cursor()
72
73 c2.execute("select 1")
74 self.assertEqual(c2.fetchone(), (1,))
75 self.assertIsNone(c2.fetchone())
76
77 def test_cleanup_rows_buffered(self):
78 conn = self.test_connection

Callers

nothing calls this directly

Calls 3

cursorMethod · 0.80
executeMethod · 0.80
fetchoneMethod · 0.45

Tested by

no test coverage detected