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

Method test_variant_empty_list

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

Source from the content-addressed store, hash-verified

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)
47 data = variant_to_binary(v)
48 v2 = variant_from_binary(ua.utils.Buffer(data))
49 self.assertEqual(v, v2)
50 self.assertTrue(v2.is_array)
51
52 def test_structs_save_and_import(self):
53 xmlpath = "tests/example.bsd"

Callers

nothing calls this directly

Calls 2

variant_to_binaryFunction · 0.90
variant_from_binaryFunction · 0.90

Tested by

no test coverage detected