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 72c9c9d commit 6b1ccfeCopy full SHA for 6b1ccfe
Lib/sqlite3/test/types.py
@@ -237,6 +237,15 @@ def test_number2(self):
237
# if the converter is not used, it's an int instead of a float
238
self.assertEqual(type(value), float)
239
240
+ def test_convert_zero_sized_blob(self):
241
+ self.con.execute("create table b(b cblob)")
242
+ sqlite.converters["CBLOB"] = lambda x: b'blobish'
243
+ self.con.execute("insert into b(b) values (?)", (b'',))
244
+ cur = self.con.execute("select b from b")
245
+ self.assertEqual(cur.fetchone()[0], b'blobish')
246
+ del sqlite.converters["CBLOB"]
247
+
248
249
class ColNamesTests(unittest.TestCase):
250
def setUp(self):
251
self.con = sqlite.connect(":memory:", detect_types=sqlite.PARSE_COLNAMES)
0 commit comments