From a8be92b6490f3e14581a18620f146016a1230125 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 29 Aug 2007 03:44:33 +0000 Subject: Fix the sqlite test. Blobs should be created using buffer(b"blob"), not buffer("blob"). --- Lib/sqlite3/test/userfunctions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/sqlite3/test/userfunctions.py b/Lib/sqlite3/test/userfunctions.py index bc8e6d2..ab4f756 100644 --- a/Lib/sqlite3/test/userfunctions.py +++ b/Lib/sqlite3/test/userfunctions.py @@ -234,7 +234,7 @@ class FunctionTests(unittest.TestCase): def CheckParamBlob(self): cur = self.con.cursor() - cur.execute("select isblob(?)", (buffer("blob"),)) + cur.execute("select isblob(?)", (buffer(b"blob"),)) val = cur.fetchone()[0] self.failUnlessEqual(val, 1) @@ -252,7 +252,7 @@ class AggregateTests(unittest.TestCase): ) """) cur.execute("insert into test(t, i, f, n, b) values (?, ?, ?, ?, ?)", - ("foo", 5, 3.14, None, buffer("blob"),)) + ("foo", 5, 3.14, None, buffer(b"blob"),)) self.con.create_aggregate("nostep", 1, AggrNoStep) self.con.create_aggregate("nofinalize", 1, AggrNoFinalize) @@ -344,7 +344,7 @@ class AggregateTests(unittest.TestCase): def CheckAggrCheckParamBlob(self): cur = self.con.cursor() - cur.execute("select checkType('blob', ?)", (buffer("blob"),)) + cur.execute("select checkType('blob', ?)", (buffer(b"blob"),)) val = cur.fetchone()[0] self.failUnlessEqual(val, 1) -- cgit v0.12