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

Method test_custom_variant

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

Source from the content-addressed store, hash-verified

294 self.assertEqual(l, l2)
295
296 def test_custom_variant(self):
297 with self.assertRaises(ua.UaError):
298 v = ua.Variant(b"ljsdfljds", ua.VariantTypeCustom(89))
299 v = ua.Variant(b"ljsdfljds", ua.VariantTypeCustom(61))
300 v2 = variant_from_binary(ua.utils.Buffer(variant_to_binary(v)))
301 self.assertEqual(v.VariantType, v2.VariantType)
302 self.assertEqual(v, v2)
303
304
305 def test_custom_variant_array(self):

Callers

nothing calls this directly

Calls 2

variant_from_binaryFunction · 0.90
variant_to_binaryFunction · 0.90

Tested by

no test coverage detected