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

Method test_nodeid_nsu

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

Source from the content-addressed store, hash-verified

154 print(v2.NodeIdValue)
155
156 def test_nodeid_nsu(self):
157 n = ua.NodeId(100, 2)
158 n.NamespaceUri = "http://freeopcua/tests"
159 n.ServerIndex = 4
160 data = nodeid_to_binary(n)
161 n2 = nodeid_from_binary(ua.utils.Buffer(data))
162 self.assertEqual(n, n2)
163 n3 = ua.NodeId.from_string(n.to_string())
164 self.assertEqual(n, n3)
165
166 def test_nodeid_ordering(self):
167 a = ua.NodeId(2000, 1)

Callers

nothing calls this directly

Calls 4

to_stringMethod · 0.95
nodeid_to_binaryFunction · 0.90
nodeid_from_binaryFunction · 0.90
from_stringMethod · 0.45

Tested by

no test coverage detected