Skip to content

Commit

Permalink
Review Changes
Browse files Browse the repository at this point in the history
Signed-off-by: asardesai2 <[email protected]>
  • Loading branch information
asardesai2 authored and sarahmonod committed Nov 27, 2023
1 parent 3957b37 commit 106bbe2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion comdb2/_ccdb2.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ cdef class _ParameterValue(object):
elif all(isinstance(ele, bytes) for ele in obj):
self.type = lib.CDB2_BLOB
self.size = sizeof(blob_descriptor)
self.owner = None
self.owner = obj
self.data = PyMem_Malloc(self.list_size * self.size)
for l_index in range(self.list_size):
(<blob_descriptor*>self.data)[l_index].size = len(obj[l_index])
Expand Down
5 changes: 5 additions & 0 deletions tests/test_dbapi2.py
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,11 @@ def test_parameter_binding_arrays(values):
"Can't bind tuple value (1j,) for parameter 'values': "
+ "ValueError: Cannot bind a tuple of complex",
),
(
((1, 2, 3),),
"Can't bind tuple value ((1, 2, 3),) for parameter 'values': "
+ "ValueError: Cannot bind a tuple of tuple",
),
],
)
def test_parameter_binding_invalid_arrays(values, exc_msg):
Expand Down

0 comments on commit 106bbe2

Please sign in to comment.