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 3da9d0e commit 6f4faa3Copy full SHA for 6f4faa3
1 file changed
Lib/test/test_sqlite3/test_factory.py
@@ -146,6 +146,14 @@ def test_sqlite_row_index(self):
146
with self.assertRaises(IndexError):
147
row[complex()] # index must be int or string
148
149
+ def test_delete_connection_row_factory(self):
150
+ # gh-149738: deleting row_factory should not segfault
151
+ del self.con.row_factory
152
+ with self.assertRaises(sqlite.OperationalError):
153
+ self.con.execute("test")
154
+ cur = self.con.cursor()
155
+ self.assertIsNone(cur.row_factory)
156
+
157
def test_sqlite_row_index_unicode(self):
158
row = self.con.execute("select 1 as \xff").fetchone()
159
self.assertEqual(row["\xff"], 1)
0 commit comments