(self)
| 563 | result = o.call_method(ua.NodeId(999), 2.1) # non existing method |
| 564 | |
| 565 | def test_method_array(self): |
| 566 | o = self.opc.get_objects_node() |
| 567 | m = o.get_child("2:ServerMethodArray") |
| 568 | result = o.call_method(m, "sin", ua.Variant(math.pi)) |
| 569 | self.assertTrue(result < 0.01) |
| 570 | with self.assertRaises(ua.UaStatusCodeError) as cm: |
| 571 | result = o.call_method(m, "cos", ua.Variant(math.pi)) |
| 572 | self.assertEqual(cm.exception.code, ua.StatusCodes.BadInvalidArgument) |
| 573 | with self.assertRaises(ua.UaStatusCodeError) as cm: |
| 574 | result = o.call_method(m, "panic", ua.Variant(math.pi)) |
| 575 | self.assertEqual(cm.exception.code, ua.StatusCodes.BadOutOfMemory) |
| 576 | |
| 577 | def test_method_array2(self): |
| 578 | o = self.opc.get_objects_node() |
nothing calls this directly
no test coverage detected