()
| 31 | |
| 32 | @pytest.fixture(scope="session", autouse=True) |
| 33 | def 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) |
nothing calls this directly
no test coverage detected