mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Fix the sqlite test. Blobs should be created using buffer(b"blob"),
not buffer("blob").
This commit is contained in:
parent
fa9a121952
commit
a8be92b649
1 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue