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

Method setUpClass

tests/tests_client.py:31–47  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

29 '''
30 @classmethod
31 def setUpClass(cls):
32 # start our own server
33 cls.srv = Server()
34 cls.srv.set_endpoint('opc.tcp://127.0.0.1:{0:d}'.format(port_num1))
35 add_server_methods(cls.srv)
36 add_server_custom_enum_struct(cls.srv)
37 cls.srv.start()
38
39 # start admin client
40 # long timeout since travis (automated testing) can be really slow
41 cls.clt = Client('opc.tcp://admin@127.0.0.1:{0:d}'.format(port_num1), timeout=10)
42 cls.clt.connect()
43 cls.opc = cls.clt
44
45 # start anonymous client
46 cls.ro_clt = Client('opc.tcp://127.0.0.1:{0:d}'.format(port_num1))
47 cls.ro_clt.connect()
48
49 @classmethod
50 def tearDownClass(cls):

Callers

nothing calls this directly

Calls 7

ServerClass · 0.90
add_server_methodsFunction · 0.90
ClientClass · 0.90
set_endpointMethod · 0.80
connectMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected