MCPcopy Create free account
hub / github.com/FreeOpcUa/python-opcua / test_string_to_variant_int

Method test_string_to_variant_int

tests/tests_unit.py:183–190  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

181 self.assertEqual(mylist, expected)
182
183 def test_string_to_variant_int(self):
184 s_arr_uint = "[1, 2, 3, 4]"
185 arr_uint = [1, 2, 3, 4]
186 s_uint = "1"
187
188 self.assertEqual(string_to_val(s_arr_uint, ua.VariantType.UInt32), arr_uint)
189 self.assertEqual(string_to_val(s_arr_uint, ua.VariantType.UInt16), arr_uint)
190 self.assertEqual(val_to_string(arr_uint), s_arr_uint)
191
192 def test_string_to_variant_float(self):
193 s_arr_float = "[1.1, 2.1, 3, 4.0]"

Callers

nothing calls this directly

Calls 2

string_to_valFunction · 0.90
val_to_stringFunction · 0.90

Tested by

no test coverage detected