MCPcopy Create free account
hub / github.com/NVIDIA/cuda-quantum / startUpMockServer

Function startUpMockServer

python/tests/backends/test_QCI.py:33–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31
32@pytest.fixture(scope="session", autouse=True)
33def startUpMockServer():
34 cudaq.set_random_seed(13)
35
36 # Launch the Mock Server
37 p = Process(target=startServer, args=(port,))
38 p.start()
39
40 if not check_server_connection(port):
41 p.terminate()
42 pytest.exit("Mock server did not start in time, skipping tests.",
43 returncode=1)
44
45 yield "Server started."
46
47 # Kill the server
48 p.terminate()
49
50
51@pytest.fixture(scope="function", autouse=True)

Callers

nothing calls this directly

Calls 3

check_server_connectionFunction · 0.90
exitMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected