📅  最后修改于: 2022-03-11 14:45:54.932000             🧑  作者: Mango
def server(host, port):
# definition of your server
@pytest.fixture(autouse=True, scope="session")
def start_server():
p = multiprocessing.Process(target=server, args=(host, port))
p.start()
yield
p.terminate()