MCPcopy Index your code
hub / github.com/PyMySQL/PyMySQL / test_cursor_is_iterator

Method test_cursor_is_iterator

pymysql/tests/test_cursor.py:52–58  ·  view source on GitHub ↗

Test that the cursor is an iterator

(self)

Source from the content-addressed store, hash-verified

50 self.addCleanup(self.test_connection.close)
51
52 def test_cursor_is_iterator(self):
53 """Test that the cursor is an iterator"""
54 conn = self.test_connection
55 cursor = conn.cursor()
56 cursor.execute("select * from test")
57 self.assertEqual(cursor.__iter__(), cursor)
58 self.assertEqual(cursor.__next__(), ("row1",))
59
60 def test_cleanup_rows_unbuffered(self):
61 conn = self.test_connection

Callers

nothing calls this directly

Calls 4

cursorMethod · 0.80
executeMethod · 0.80
__iter__Method · 0.80
__next__Method · 0.80

Tested by

no test coverage detected