Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a8be92b

Browse files
committed
Fix the sqlite test. Blobs should be created using buffer(b"blob"),
not buffer("blob").
1 parent fa9a121 commit a8be92b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/sqlite3/test/userfunctions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def CheckParamNone(self):
234234

235235
def CheckParamBlob(self):
236236
cur = self.con.cursor()
237-
cur.execute("select isblob(?)", (buffer("blob"),))
237+
cur.execute("select isblob(?)", (buffer(b"blob"),))
238238
val = cur.fetchone()[0]
239239
self.failUnlessEqual(val, 1)
240240

@@ -252,7 +252,7 @@ def setUp(self):
252252
)
253253
""")
254254
cur.execute("insert into test(t, i, f, n, b) values (?, ?, ?, ?, ?)",
255-
("foo", 5, 3.14, None, buffer("blob"),))
255+
("foo", 5, 3.14, None, buffer(b"blob"),))
256256

257257
self.con.create_aggregate("nostep", 1, AggrNoStep)
258258
self.con.create_aggregate("nofinalize", 1, AggrNoFinalize)
@@ -344,7 +344,7 @@ def CheckAggrCheckParamNone(self):
344344

345345
def CheckAggrCheckParamBlob(self):
346346
cur = self.con.cursor()
347-
cur.execute("select checkType('blob', ?)", (buffer("blob"),))
347+
cur.execute("select checkType('blob', ?)", (buffer(b"blob"),))
348348
val = cur.fetchone()[0]
349349
self.failUnlessEqual(val, 1)
350350

0 commit comments

Comments
 (0)