[Python-3000-checkins] r57643 - python/branches/py3k/Lib/sqlite3/test/userfunctions.py

guido.van.rossum python-3000-checkins at python.org
Wed Aug 29 05:44:33 CEST 2007


Author: guido.van.rossum
Date: Wed Aug 29 05:44:33 2007
New Revision: 57643

Modified:
   python/branches/py3k/Lib/sqlite3/test/userfunctions.py
Log:
Fix the sqlite test.  Blobs should be created using buffer(b"blob"),
not buffer("blob").


Modified: python/branches/py3k/Lib/sqlite3/test/userfunctions.py
==============================================================================
--- python/branches/py3k/Lib/sqlite3/test/userfunctions.py	(original)
+++ python/branches/py3k/Lib/sqlite3/test/userfunctions.py	Wed Aug 29 05:44:33 2007
@@ -234,7 +234,7 @@
 
     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 @@
                 )
             """)
         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 @@
 
     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)
 


More information about the Python-3000-checkins mailing list