Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3dbd4c commit fba8c7cCopy full SHA for fba8c7c
Lib/test/test_sqlite3/test_factory.py
@@ -179,8 +179,14 @@ def test_sqlite_row_iter(self):
179
"""Checks if the row object is iterable"""
180
self.con.row_factory = sqlite.Row
181
row = self.con.execute("select 1 as a, 2 as b").fetchone()
182
- for col in row:
183
- pass
+
+ # Is iterable in correct order and produces valid results:
184
+ items = [col for col in row]
185
+ self.assertEqual(items, [1, 2])
186
187
+ # Is iterable the second time:
188
189
190
191
def test_sqlite_row_as_tuple(self):
192
"""Checks if the row object can be converted to a tuple"""
0 commit comments