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

Method setUpClass

tests/tests_cmd_lines.py:16–25  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

14 '''
15 @classmethod
16 def setUpClass(cls):
17 cls.srv = Server()
18 cls.srv_url = 'opc.tcp://127.0.0.1:{0:d}'.format(port_num)
19 cls.srv.set_endpoint(cls.srv_url)
20 objects = cls.srv.get_objects_node()
21 obj = objects.add_object(4, "directory")
22 var = obj.add_variable(4, "variable", 1.999)
23 var2 = obj.add_variable(4, "variable2", 1.777)
24 var2.set_writable()
25 cls.srv.start()
26
27 def test_uals(self):
28 s = subprocess.check_output(["python", "tools/uals", "--url", self.srv_url])

Callers

nothing calls this directly

Calls 7

ServerClass · 0.90
set_endpointMethod · 0.80
set_writableMethod · 0.80
get_objects_nodeMethod · 0.45
add_objectMethod · 0.45
add_variableMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected