mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
parent
fc3ba6b8fc
commit
023fe334bb
5 changed files with 54 additions and 9 deletions
|
@ -225,6 +225,13 @@ class CursorTests(unittest.TestCase):
|
|||
def CheckExecuteArgString(self):
|
||||
self.cu.execute("insert into test(name) values (?)", ("Hugo",))
|
||||
|
||||
def CheckExecuteArgStringWithZeroByte(self):
|
||||
self.cu.execute("insert into test(name) values (?)", ("Hu\x00go",))
|
||||
|
||||
self.cu.execute("select name from test where id=?", (self.cu.lastrowid,))
|
||||
row = self.cu.fetchone()
|
||||
self.assertEqual(row[0], "Hu\x00go")
|
||||
|
||||
def CheckExecuteWrongNoOfArgs1(self):
|
||||
# too many parameters
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue