From 8a04d4978ee52be24bc9cb61b2b81852d3f91ad4 Mon Sep 17 00:00:00 2001 From: Arjo Chakravarty Date: Thu, 4 Jan 2024 09:53:24 +0800 Subject: [PATCH] Update tests to actually try to serialize a char Depends on ros2/rosidl#781 Signed-off-by: Arjo Chakravarty --- test/rosidl_runtime_py/test_set_message.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/rosidl_runtime_py/test_set_message.py b/test/rosidl_runtime_py/test_set_message.py index 9c39f09..1bb20d0 100644 --- a/test/rosidl_runtime_py/test_set_message.py +++ b/test/rosidl_runtime_py/test_set_message.py @@ -122,13 +122,13 @@ def test_set_message_fields_none(): def test_set_message_fields_partial(): original_msg = message_fixtures.get_msg_basic_types()[0] original_msg.bool_value = False - original_msg.char_value = 3 + original_msg.char_value = chr(3) original_msg.int32_value = 42 modified_msg = copy.copy(original_msg) values = {} values['bool_value'] = True - values['char_value'] = 1 + values['char_value'] = chr(1) values['int32_value'] = 24 set_message_fields(modified_msg, values) @@ -213,7 +213,7 @@ def test_set_message_fields_nested_type(): msg0 = message_fixtures.get_msg_nested()[0] msg0.basic_types_value.bool_value = False - msg0.basic_types_value.char_value = 3 + msg0.basic_types_value.char_value = chr(3) msg0.basic_types_value.int32_value = 42 assert msg0.basic_types_value != msg_basic_types