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

Method test_variant_array_none

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

Source from the content-addressed store, hash-verified

30 '''
31
32 def test_variant_array_none(self):
33 v = ua.Variant(None, varianttype=ua.VariantType.Int32, is_array=True)
34 data = variant_to_binary(v)
35 v2 = variant_from_binary(ua.utils.Buffer(data))
36 self.assertEqual(v, v2)
37 self.assertTrue(v2.is_array)
38
39 v = ua.Variant(None, varianttype=ua.VariantType.Null, is_array=True)
40 data = variant_to_binary(v)
41 v2 = variant_from_binary(ua.utils.Buffer(data))
42 self.assertEqual(v, v2)
43 self.assertTrue(v2.is_array)
44
45 def test_variant_empty_list(self):
46 v = ua.Variant([], varianttype=ua.VariantType.Int32, is_array=True)

Callers

nothing calls this directly

Calls 2

variant_to_binaryFunction · 0.90
variant_from_binaryFunction · 0.90

Tested by

no test coverage detected