tests_unit.py
Go to the documentation of this file.
1 # encoding: utf-8
2 #! /usr/bin/env python
3 import logging
4 import io
5 from datetime import datetime
6 import unittest
7 from collections import namedtuple
8 import uuid
9 
10 from opcua import ua
11 from opcua.ua import extensionobject_from_binary
12 from opcua.ua import extensionobject_to_binary
13 from opcua.ua.uatypes import flatten, get_shape, reshape
14 from opcua.server.internal_subscription import WhereClauseEvaluator
15 from opcua.common.event_objects import BaseEvent
16 from opcua.common.ua_utils import string_to_variant, variant_to_string, string_to_val, val_to_string
17 from opcua.common.xmlimporter import XmlImporter
18 from opcua.ua.uatypes import _MaskEnum
19 
20 
21 class TestUnit(unittest.TestCase):
22 
23  '''
24  Simple unit test that do not need to setup a server or a client
25  '''
26 
28  a = ua.NodeId(2000, 1)
29  b = ua.NodeId(3000, 1)
30  c = ua.NodeId(20, 0)
31  d = ua.NodeId("tititu", 1)
32  e = ua.NodeId("aaaaa", 1)
33  f = ua.NodeId("aaaaa", 2)
34  g = ua.NodeId(uuid.uuid4(), 1)
35  h = ua.TwoByteNodeId(2001)
36  i = ua.NodeId(b"lkjkl", 1, ua.NodeIdType.ByteString)
37  j = ua.NodeId(b"aaa", 5, ua.NodeIdType.ByteString)
38 
39  mylist = [a, b, c, d, e, f, g, h, i, j]
40  mylist.sort()
41  expected = [c, h, a, b, e, d, f, g, i, j]
42  self.assertEqual(mylist, expected)
43 
45  s_arr_uint = "[1, 2, 3, 4]"
46  arr_uint = [1, 2, 3, 4]
47  s_uint = "1"
48 
49  self.assertEqual(string_to_val(s_arr_uint, ua.VariantType.UInt32), arr_uint)
50  self.assertEqual(string_to_val(s_arr_uint, ua.VariantType.UInt16), arr_uint)
51  self.assertEqual(val_to_string(arr_uint), s_arr_uint)
52 
54  s_arr_float = "[1.1, 2.1, 3, 4.0]"
55  arr_float = [1.1, 2.1, 3, 4.0]
56  s_float = "1.9"
57  self.assertEqual(string_to_val(s_float, ua.VariantType.Float), 1.9)
58  self.assertEqual(val_to_string(arr_float), s_arr_float)
59 
61  s_arr_datetime = "[2014-05-6, 2016-10-3]"
62  arr_string = ['2014-05-6', '2016-10-3']
63  arr_datetime = [datetime(2014, 5, 6), datetime(2016, 10, 3)]
64  s_datetime = "2014-05-3"
65  self.assertEqual(val_to_string(arr_string), s_arr_datetime)
66  self.assertEqual(string_to_val(s_arr_datetime, ua.VariantType.String), arr_string)
67  self.assertEqual(string_to_val(s_arr_datetime, ua.VariantType.DateTime), arr_datetime)
68 
70  s_arr_nodeid = "[ns=2;i=56, i=45]"
71  arr_nodeid = [ua.NodeId.from_string("ns=2;i=56"), ua.NodeId.from_string("i=45")]
72  s_nodeid = "i=45"
73  self.assertEqual(string_to_val(s_arr_nodeid, ua.VariantType.NodeId), arr_nodeid)
74 
76  s_statuscode = "Good"
77  statuscode = ua.StatusCode(ua.StatusCodes.Good)
78  s_statuscode2 = "Uncertain"
79  statuscode2 = ua.StatusCode(ua.StatusCodes.Uncertain)
80  self.assertEqual(string_to_val(s_statuscode, ua.VariantType.StatusCode), statuscode)
81  self.assertEqual(string_to_val(s_statuscode2, ua.VariantType.StatusCode), statuscode2)
83  string = "2:name"
84  obj = ua.QualifiedName("name", 2)
85  self.assertEqual(string_to_val(string, ua.VariantType.QualifiedName), obj)
86  self.assertEqual(val_to_string(obj), string)
87 
89  string = "_This is my string"
90  # string = "_This is my nøåæ"FIXME: does not work with python2 ?!?!
91  obj = ua.LocalizedText(string)
92  self.assertEqual(string_to_val(string, ua.VariantType.LocalizedText), obj)
93  self.assertEqual(val_to_string(obj), string)
94 
96  l = [[[1.0, 1.0, 1.0, 1.0], [2.0, 2.0, 2.0, 2.0], [3.0, 3.0, 3.0, 3.0]], [[5.0, 5.0, 5.0, 5.0], [7.0, 8.0, 9.0, 01.0], [1.0, 1.0, 1.0, 1.0]]]
97  v = ua.Variant(l)
98  self.assertEqual(v.Dimensions, [2, 3, 4])
99  v2 = ua.Variant.from_binary(ua.utils.Buffer(v.to_binary()))
100  self.assertEqual(v, v2)
101  self.assertEqual(v.Dimensions, v2.Dimensions)
102 
103  # very special case
104  l = [[[], [], []], [[], [], []]]
105  v = ua.Variant(l, ua.VariantType.UInt32)
106  self.assertEqual(v.Dimensions, [2, 3, 0])
107  v2 = ua.Variant.from_binary(ua.utils.Buffer(v.to_binary()))
108  self.assertEqual(v.Dimensions, v2.Dimensions)
109  self.assertEqual(v, v2)
110 
111  def test_flatten(self):
112  l = [[[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]], [[1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]]]
113  l2 = flatten(l)
114  dims = get_shape(l)
115  self.assertEqual(dims, [2, 3, 4])
116  self.assertNotEqual(l, l2)
117 
118  l3 = reshape(l2, (2, 3, 4))
119  self.assertEqual(l, l3)
120 
121 
122  l = [[[], [], []], [[], [], []]]
123  l2 = flatten(l)
124  dims = get_shape(l)
125  self.assertEqual(dims, [2, 3, 0])
126 
127  l = [1, 2, 3, 4]
128  l2 = flatten(l)
129  dims = get_shape(l)
130  self.assertEqual(dims, [4])
131  self.assertEqual(l, l2)
132 
134  with self.assertRaises(ua.UaError):
135  v = ua.Variant(b"ljsdfljds", ua.VariantTypeCustom(89))
136  v = ua.Variant(b"ljsdfljds", ua.VariantTypeCustom(61))
137  v2 = ua.Variant.from_binary(ua.utils.Buffer(v.to_binary()))
138  self.assertEqual(v.VariantType, v2.VariantType)
139  self.assertEqual(v, v2)
140 
141 
143  v = ua.Variant([b"ljsdfljds", b"lkjsdljksdf"], ua.VariantTypeCustom(40))
144  v2 = ua.Variant.from_binary(ua.utils.Buffer(v.to_binary()))
145  self.assertEqual(v.VariantType, v2.VariantType)
146  self.assertEqual(v, v2)
147 
148  def test_guid(self):
149  v = ua.Variant(uuid.uuid4(), ua.VariantType.Guid)
150  v2 = ua.Variant.from_binary(ua.utils.Buffer(v.to_binary()))
151  self.assertEqual(v.VariantType, v2.VariantType)
152  self.assertEqual(v, v2)
153 
154  def test_nodeid(self):
155  nid = ua.NodeId()
156  self.assertEqual(nid.NodeIdType, ua.NodeIdType.TwoByte)
157  nid = ua.NodeId(446, 3, ua.NodeIdType.FourByte)
158  self.assertEqual(nid.NodeIdType, ua.NodeIdType.FourByte)
159  d = nid.to_binary()
160  new_nid = nid.from_binary(io.BytesIO(d))
161  self.assertEqual(new_nid, nid)
162  self.assertEqual(new_nid.NodeIdType, ua.NodeIdType.FourByte)
163  self.assertEqual(new_nid.Identifier, 446)
164  self.assertEqual(new_nid.NamespaceIndex, 3)
165 
166  tb = ua.TwoByteNodeId(53)
167  fb = ua.FourByteNodeId(53)
168  n = ua.NumericNodeId(53)
169  n1 = ua.NumericNodeId(53, 0)
170  s = ua.StringNodeId(53, 0) # should we raise an exception???
171  s1 = ua.StringNodeId("53", 0)
172  bs = ua.ByteStringNodeId(b"53", 0)
173  gid = uuid.uuid4()
174  g = ua.ByteStringNodeId(str(gid), 0)
175  guid = ua.GuidNodeId(gid)
176  self.assertEqual(tb, fb)
177  self.assertEqual(tb, n)
178  self.assertEqual(tb, n1)
179  self.assertEqual(n1, fb)
180  self.assertNotEqual(n1, s)
181  self.assertNotEqual(s, bs)
182  self.assertNotEqual(s, g)
183  self.assertNotEqual(g, guid)
184  self.assertEqual(tb, ua.NodeId.from_binary(ua.utils.Buffer(tb.to_binary())))
185  self.assertEqual(fb, ua.NodeId.from_binary(ua.utils.Buffer(fb.to_binary())))
186  self.assertEqual(n, ua.NodeId.from_binary(ua.utils.Buffer(n.to_binary())))
187  self.assertEqual(s1, ua.NodeId.from_binary(ua.utils.Buffer(s1.to_binary())))
188  self.assertEqual(bs, ua.NodeId.from_binary(ua.utils.Buffer(bs.to_binary())))
189  self.assertEqual(guid, ua.NodeId.from_binary(ua.utils.Buffer(guid.to_binary())))
190 
192  nid0 = ua.NodeId(45)
193  self.assertEqual(nid0, ua.NodeId.from_string("i=45"))
194  self.assertEqual(nid0, ua.NodeId.from_string("ns=0;i=45"))
195  nid = ua.NodeId(45, 10)
196  self.assertEqual(nid, ua.NodeId.from_string("i=45; ns=10"))
197  self.assertNotEqual(nid, ua.NodeId.from_string("i=45; ns=11"))
198  self.assertNotEqual(nid, ua.NodeId.from_string("i=5; ns=10"))
199  # not sure the next one is correct...
200  self.assertEqual(nid, ua.NodeId.from_string("i=45; ns=10; srv=serverid"))
201 
202  nid1 = ua.NodeId("myid.mynodeid", 7)
203  self.assertEqual(nid1, ua.NodeId.from_string("ns=7; s=myid.mynodeid"))
204  with self.assertRaises(ua.UaError):
205  nid1 = ua.NodeId(7, "myid.mynodeid")
206 
207  def test_bad_string(self):
208  with self.assertRaises(ua.UaStringParsingError):
209  ua.NodeId.from_string("ns=r;s=yu")
210  with self.assertRaises(ua.UaStringParsingError):
211  ua.NodeId.from_string("i=r;ns=1")
212  with self.assertRaises(ua.UaStringParsingError):
213  ua.NodeId.from_string("ns=1")
214  with self.assertRaises(ua.UaError):
215  ua.QualifiedName.from_string("i:yu")
216  with self.assertRaises(ua.UaError):
217  ua.QualifiedName.from_string("i:::yu")
218 
220  nid = ua.ExpandedNodeId()
221  self.assertEqual(nid.NodeIdType, ua.NodeIdType.TwoByte)
222  nid2 = ua.ExpandedNodeId.from_binary(ua.utils.Buffer(nid.to_binary()))
223  self.assertEqual(nid, nid2)
224 
225  def test_null_string(self):
226  v = ua.Variant(None, ua.VariantType.String)
227  b = v.to_binary()
228  v2 = ua.Variant.from_binary(ua.utils.Buffer(b))
229  self.assertEqual(v.Value, v2.Value)
230  v = ua.Variant("", ua.VariantType.String)
231  b = v.to_binary()
232  v2 = ua.Variant.from_binary(ua.utils.Buffer(b))
233  self.assertEqual(v.Value, v2.Value)
234 
236  obj = ua.UserNameIdentityToken()
237  obj.UserName = "admin"
238  obj.Password = b"pass"
239  obj2 = ua.extensionobject_from_binary(ua.utils.Buffer(extensionobject_to_binary(obj)))
240  self.assertEqual(type(obj), type(obj2))
241  self.assertEqual(obj.UserName, obj2.UserName)
242  self.assertEqual(obj.Password, obj2.Password)
243  v1 = ua.Variant(obj)
244  v2 = ua.Variant.from_binary(ua.utils.Buffer(v1.to_binary()))
245  self.assertEqual(type(v1), type(v2))
246  self.assertEqual(v1.VariantType, v2.VariantType)
247 
249  obj = ua.ExtensionObject()
250  obj.Body = b'example of data in custom format'
251  obj.TypeId = ua.NodeId.from_string('ns=3;i=42')
252  data = ua.utils.Buffer(extensionobject_to_binary(obj))
253  obj2 = ua.extensionobject_from_binary(data)
254  self.assertEqual(type(obj2), ua.ExtensionObject)
255  self.assertEqual(obj2.TypeId, obj.TypeId)
256  self.assertEqual(obj2.Body, b'example of data in custom format')
257 
258  def test_datetime(self):
259  now = datetime.utcnow()
260  epch = ua.ua_binary.datetime_to_win_epoch(now)
261  dt = ua.ua_binary.win_epoch_to_datetime(epch)
262  self.assertEqual(now, dt)
263 
264  # python's datetime has a range from Jan 1, 0001 to the end of year 9999
265  # windows' filetime has a range from Jan 1, 1601 to approx. year 30828
266  # let's test an overlapping range [Jan 1, 1601 - Dec 31, 9999]
267  dt = datetime(1601, 1, 1)
268  self.assertEqual(ua.ua_binary.win_epoch_to_datetime(ua.ua_binary.datetime_to_win_epoch(dt)), dt)
269  dt = datetime(9999, 12, 31, 23, 59, 59)
270  self.assertEqual(ua.ua_binary.win_epoch_to_datetime(ua.ua_binary.datetime_to_win_epoch(dt)), dt)
271 
272  epch = 128930364000001000
273  dt = ua.ua_binary.win_epoch_to_datetime(epch)
274  epch2 = ua.ua_binary.datetime_to_win_epoch(dt)
275  self.assertEqual(epch, epch2)
276 
277  epch = 0
278  self.assertEqual(ua.ua_binary.datetime_to_win_epoch(ua.ua_binary.win_epoch_to_datetime(epch)), epch)
279 
280  def test_equal_nodeid(self):
281  nid1 = ua.NodeId(999, 2)
282  nid2 = ua.NodeId(999, 2)
283  self.assertTrue(nid1 == nid2)
284  self.assertTrue(id(nid1) != id(nid2))
285 
286  def test_zero_nodeid(self):
287  self.assertEqual(ua.NodeId(), ua.NodeId(0, 0))
288  self.assertEqual(ua.NodeId(), ua.NodeId.from_string('ns=0;i=0;'))
289 
291  nid = ua.NodeId('titi', 1)
292  self.assertEqual(nid.NamespaceIndex, 1)
293  self.assertEqual(nid.Identifier, 'titi')
294  self.assertEqual(nid.NodeIdType, ua.NodeIdType.String)
295 
297  nid = ua.NodeId('hëllò', 1)
298  self.assertEqual(nid.NamespaceIndex, 1)
299  self.assertEqual(nid.Identifier, 'hëllò')
300  self.assertEqual(nid.NodeIdType, ua.NodeIdType.String)
301  d = nid.to_binary()
302  new_nid = nid.from_binary(io.BytesIO(d))
303  self.assertEqual(new_nid, nid)
304  self.assertEqual(new_nid.Identifier, 'hëllò')
305  self.assertEqual(new_nid.NodeIdType, ua.NodeIdType.String)
306 
308  nid = ua.NodeId(999, 2)
309  self.assertEqual(nid.NamespaceIndex, 2)
310  self.assertEqual(nid.Identifier, 999)
311  self.assertEqual(nid.NodeIdType, ua.NodeIdType.Numeric)
312 
314  nid = ua.NodeId.from_string('ns=2;s=PLC1.Manufacturer;')
315  self.assertEqual(nid.NamespaceIndex, 2)
316  self.assertEqual(nid.Identifier, 'PLC1.Manufacturer')
317 
319  nid = ua.NodeId.from_string('ns=2;s=PLC1.Manufacturer;')
320  self.assertEqual(nid.to_string(), 'ns=2;s=PLC1.Manufacturer')
321  # self.assertEqual(repr(nid), 'ns=2;s=PLC1.Manufacturer;')
322 
324  qn = ua.QualifiedName('qname', 2)
325  self.assertEqual(qn.NamespaceIndex, 2)
326  self.assertEqual(qn.Name, 'qname')
327  self.assertEqual(qn.to_string(), '2:qname')
328 
329  def test_datavalue(self):
330  dv = ua.DataValue(123)
331  self.assertEqual(dv.Value, ua.Variant(123))
332  self.assertEqual(type(dv.Value), ua.Variant)
333  dv = ua.DataValue('abc')
334  self.assertEqual(dv.Value, ua.Variant('abc'))
335  now = datetime.utcnow()
336  dv.SourceTimestamp = now
337 
338  def test_variant(self):
339  dv = ua.Variant(True, ua.VariantType.Boolean)
340  self.assertEqual(dv.Value, True)
341  self.assertEqual(type(dv.Value), bool)
342  now = datetime.utcnow()
343  v = ua.Variant(now)
344  self.assertEqual(v.Value, now)
345  self.assertEqual(v.VariantType, ua.VariantType.DateTime)
346  v2 = ua.Variant.from_binary(ua.utils.Buffer(v.to_binary()))
347  self.assertEqual(v.Value, v2.Value)
348  self.assertEqual(v.VariantType, v2.VariantType)
349  # commonity method:
350  self.assertEqual(v, ua.Variant(v))
351 
353  v = ua.Variant([1, 2, 3, 4, 5])
354  self.assertEqual(v.Value[1], 2)
355  # self.assertEqual(v.VarianType, ua.VariantType.Int64) # we do not care, we should aonly test for sutff that matter
356  v2 = ua.Variant.from_binary(ua.utils.Buffer(v.to_binary()))
357  self.assertEqual(v.Value, v2.Value)
358  self.assertEqual(v.VariantType, v2.VariantType)
359 
360  now = datetime.utcnow()
361  v = ua.Variant([now])
362  self.assertEqual(v.Value[0], now)
363  self.assertEqual(v.VariantType, ua.VariantType.DateTime)
364  v2 = ua.Variant.from_binary(ua.utils.Buffer(v.to_binary()))
365  self.assertEqual(v.Value, v2.Value)
366  self.assertEqual(v.VariantType, v2.VariantType)
367 
369  v = ua.Variant([1, 2, 3, 4, 5, 6], dimensions=[2, 3])
370  self.assertEqual(v.Value[1], 2)
371  v2 = ua.Variant.from_binary(ua.utils.Buffer(v.to_binary()))
372  self.assertEqual(reshape(v.Value, (2, 3)), v2.Value)
373  self.assertEqual(v.VariantType, v2.VariantType)
374  self.assertEqual(v.Dimensions, v2.Dimensions)
375  self.assertEqual(v2.Dimensions, [2, 3])
376 
377  def test_text(self):
378  t1 = ua.LocalizedText('Root')
379  t2 = ua.LocalizedText('Root')
380  t3 = ua.LocalizedText('root')
381  self.assertEqual(t1, t2)
382  self.assertNotEqual(t1, t3)
383  t4 = ua.LocalizedText.from_binary(ua.utils.Buffer(t1.to_binary()))
384  self.assertEqual(t1, t4)
385 
387  pol = ua.SecurityPolicy()
388  chunks = ua.MessageChunk.message_to_chunks(pol, b'123', 65536)
389  self.assertEqual(len(chunks), 1)
390  seq = 0
391  for chunk in chunks:
392  seq += 1
393  chunk.SequenceHeader.SequenceNumber = seq
394  chunk2 = ua.MessageChunk.from_binary(pol, ua.utils.Buffer(chunks[0].to_binary()))
395  self.assertEqual(chunks[0].to_binary(), chunk2.to_binary())
396 
397  # for policy None, MessageChunk overhead is 12+4+8 = 24 bytes
398  # Let's pack 11 bytes into 28-byte chunks. The message must be split as 4+4+3
399  chunks = ua.MessageChunk.message_to_chunks(pol, b'12345678901', 28)
400  self.assertEqual(len(chunks), 3)
401  self.assertEqual(chunks[0].Body, b'1234')
402  self.assertEqual(chunks[1].Body, b'5678')
403  self.assertEqual(chunks[2].Body, b'901')
404  for chunk in chunks:
405  seq += 1
406  chunk.SequenceHeader.SequenceNumber = seq
407  self.assertTrue(len(chunk.to_binary()) <= 28)
408 
409  def test_null(self):
410  n = ua.NodeId(b'000000', 0, nodeidtype=ua.NodeIdType.Guid)
411  self.assertTrue(n.is_null())
412  self.assertTrue(n.has_null_identifier())
413 
414  n = ua.NodeId(b'000000', 1, nodeidtype=ua.NodeIdType.Guid)
415  self.assertFalse(n.is_null())
416  self.assertTrue(n.has_null_identifier())
417 
418  n = ua.NodeId()
419  self.assertTrue(n.is_null())
420  self.assertTrue(n.has_null_identifier())
421 
422  n = ua.NodeId(0, 0)
423  self.assertTrue(n.is_null())
424  self.assertTrue(n.has_null_identifier())
425 
426  n = ua.NodeId("", 0)
427  self.assertTrue(n.is_null())
428  self.assertTrue(n.has_null_identifier())
429 
430  n = ua.TwoByteNodeId(0)
431  self.assertTrue(n.is_null())
432  self.assertTrue(n.has_null_identifier())
433 
434  n = ua.NodeId(0, 3)
435  self.assertFalse(n.is_null())
436  self.assertTrue(n.has_null_identifier())
437 
438  def test_where_clause(self):
439  cf = ua.ContentFilter()
440 
441  el = ua.ContentFilterElement()
442 
443  op = ua.SimpleAttributeOperand()
444  op.BrowsePath.append(ua.QualifiedName("property", 2))
445  el.FilterOperands.append(op)
446 
447  for i in range(10):
448  op = ua.LiteralOperand()
449  op.Value = ua.Variant(i)
450  el.FilterOperands.append(op)
451 
452  el.FilterOperator = ua.FilterOperator.InList
453  cf.Elements.append(el)
454 
455  wce = WhereClauseEvaluator(logging.getLogger(__name__), None, cf)
456 
457  ev = BaseEvent()
458  ev._freeze = False
459  ev.property = 3
460 
461  self.assertTrue(wce.eval(ev))
462 
463 
464 class TestMaskEnum(unittest.TestCase):
466  member1 = 0
467  member2 = 1
468 
470  with self.assertRaises(ValueError):
471  self.MyEnum(12345)
472 
473  def test_parsing(self):
474  self.assertEqual(self.MyEnum.parse_bitfield(0b0), set())
475  self.assertEqual(self.MyEnum.parse_bitfield(0b1), {self.MyEnum.member1})
476  self.assertEqual(self.MyEnum.parse_bitfield(0b10), {self.MyEnum.member2})
477  self.assertEqual(self.MyEnum.parse_bitfield(0b11), {self.MyEnum.member1, self.MyEnum.member2})
478 
479  def test_identity(self):
480  bitfields = [0b00, 0b01, 0b10, 0b11]
481 
482  for bitfield in bitfields:
483  as_set = self.MyEnum.parse_bitfield(bitfield)
484  back_to_bitfield = self.MyEnum.to_bitfield(as_set)
485  self.assertEqual(back_to_bitfield, bitfield)
486 
487 
488 if __name__ == '__main__':
489  logging.basicConfig(level=logging.WARN)
490 
491  unittest.main(verbosity=3)
def test_string_to_variant_qname(self)
Definition: tests_unit.py:82
def test_extension_object(self)
Definition: tests_unit.py:235
def test_string_to_variant_localized_text(self)
Definition: tests_unit.py:88
def test_text(self)
Definition: tests_unit.py:377
def test_string_to_variant_float(self)
Definition: tests_unit.py:53
def test_datavalue(self)
Definition: tests_unit.py:329
def test_string_to_variant_int(self)
Definition: tests_unit.py:44
def test_variant(self)
Definition: tests_unit.py:338
def test_numeric_nodeid(self)
Definition: tests_unit.py:307
def test_message_chunk(self)
Definition: tests_unit.py:386
def test_strrepr_nodeid(self)
Definition: tests_unit.py:318
def test_invalid_input(self)
Definition: tests_unit.py:469
def val_to_string(val)
Definition: ua_utils.py:14
def test_expandednodeid(self)
Definition: tests_unit.py:219
def test_where_clause(self)
Definition: tests_unit.py:438
def string_to_val(string, vtype)
Definition: ua_utils.py:59
def flatten(mylist)
Definition: uatypes.py:877
def test_qualifiedstring_nodeid(self)
Definition: tests_unit.py:313
def test_qualified_name(self)
Definition: tests_unit.py:323
def test_string_to_variant_status_code(self)
Definition: tests_unit.py:75
def test_custom_variant_array(self)
Definition: tests_unit.py:142
def test_variant_array_dim(self)
Definition: tests_unit.py:368
def test_equal_nodeid(self)
Definition: tests_unit.py:280
def test_flatten(self)
Definition: tests_unit.py:111
def test_string_to_variant_nodeid(self)
Definition: tests_unit.py:69
def test_unicode_string_nodeid(self)
Definition: tests_unit.py:296
def test_guid(self)
Definition: tests_unit.py:148
def reshape(flat, dims)
Definition: uatypes.py:847
def test_nodeid_string(self)
Definition: tests_unit.py:191
def get_shape(mylist)
Definition: uatypes.py:887
def test_custom_variant(self)
Definition: tests_unit.py:133
def test_variant_array(self)
Definition: tests_unit.py:352
def test_zero_nodeid(self)
Definition: tests_unit.py:286
def test_null(self)
Definition: tests_unit.py:409
def test_string_nodeid(self)
Definition: tests_unit.py:290
def test_variant_dimensions(self)
Definition: tests_unit.py:95
def test_nodeid_ordering(self)
Definition: tests_unit.py:27
def test_unknown_extension_object(self)
Definition: tests_unit.py:248
def test_nodeid(self)
Definition: tests_unit.py:154
def test_datetime(self)
Definition: tests_unit.py:258
def test_bad_string(self)
Definition: tests_unit.py:207
def test_string_to_variant_datetime_string(self)
Definition: tests_unit.py:60
def test_null_string(self)
Definition: tests_unit.py:225


ros_opcua_impl_python_opcua
Author(s): Denis Štogl , Daniel Draper
autogenerated on Tue Jan 19 2021 03:12:44