We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ffc672 commit 0428550Copy full SHA for 0428550
Lib/sqlite3/test/factory.py
@@ -155,8 +155,14 @@ def test_sqlite_row_iter(self):
155
"""Checks if the row object is iterable"""
156
self.con.row_factory = sqlite.Row
157
row = self.con.execute("select 1 as a, 2 as b").fetchone()
158
- for col in row:
159
- pass
+
+ # Is iterable in correct order and produces valid results:
160
+ items = [col for col in row]
161
+ self.assertEqual(items, [1, 2])
162
163
+ # Is iterable the second time:
164
165
166
167
def test_sqlite_row_as_tuple(self):
168
"""Checks if the row object can be converted to a tuple"""
0 commit comments