From 0f7230a8eb937a6bc54cf4ff10a181f38182e5d1 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Sat, 28 Sep 2024 20:26:50 +0800 Subject: [PATCH] fix: varbinary with bytearray --- tests/test_bind2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_bind2.py b/tests/test_bind2.py index 76e57fec..8701fd93 100644 --- a/tests/test_bind2.py +++ b/tests/test_bind2.py @@ -97,7 +97,7 @@ def test_new_stmt2_binds(): bind.set_value(FieldType.C_BINARY, ["涛思数据", None, "a long string with 中文字符"]) bind.set_value(FieldType.C_NCHAR, ["涛思数据", None, "a long string with 中文字符"]) bind.set_value(FieldType.C_JSON, ["{'hello': 'world'}"]) - bind.set_value(FieldType.C_VARBINARY, [[0x01, 0x02, 0x03, 0x04], [0x01, 0x02, 0x03, 0x04], [0x01, 0x02, 0x03, 0x04]]) + bind.set_value(FieldType.C_VARBINARY, [bytearray([0x01, 0x02, 0x03, 0x04]), bytearray([0x01, 0x02, 0x03, 0x04]), bytearray([0x01, 0x02, 0x03, 0x04])]) bind.set_value(FieldType.C_GEOMETRY, [ bytearray([0x00, 0x00, 0x59, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x40]), bytearray([0x01, 00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x40]),