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

Method test_null_string

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

Source from the content-addressed store, hash-verified

384 self.assertEqual(nid, nid2)
385
386 def test_null_string(self):
387 v = ua.Variant(None, ua.VariantType.String)
388 b = variant_to_binary(v)
389 v2 = variant_from_binary(ua.utils.Buffer(b))
390 self.assertEqual(v.Value, v2.Value)
391 v = ua.Variant("", ua.VariantType.String)
392 b = variant_to_binary(v)
393 v2 = variant_from_binary(ua.utils.Buffer(b))
394 self.assertEqual(v.Value, v2.Value)
395
396 def test_extension_object(self):
397 obj = ua.UserNameIdentityToken()

Callers

nothing calls this directly

Calls 2

variant_to_binaryFunction · 0.90
variant_from_binaryFunction · 0.90

Tested by

no test coverage detected