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

Method test_string_to_variant_float

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

Source from the content-addressed store, hash-verified

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]"
194 arr_float = [1.1, 2.1, 3, 4.0]
195 s_float = "1.9"
196 self.assertEqual(string_to_val(s_float, ua.VariantType.Float), 1.9)
197 self.assertEqual(val_to_string(arr_float), s_arr_float)
198
199 def test_string_to_variant_datetime_string(self):
200 s_arr_datetime = "[2014-05-6, 2016-10-3]"

Callers

nothing calls this directly

Calls 2

string_to_valFunction · 0.90
val_to_stringFunction · 0.90

Tested by

no test coverage detected