Here is how to start a process inside a test suite, using a pytest fixture. This comes straight from this post. defrun_websocket_server(server_running_file=None):ds_proc=subprocess.Popen(["umap","run_websocket_server",],stdout=subprocess.PIPE,stderr=subprocess.STDOUT,)time.sleep(2)# Ensure it started properly before yieldingassertnotds_proc.poll(),ds_proc …