Answers for "pytest create server"

0

pytest create server

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()
Posted by: Guest on July-02-2020

Python Answers by Framework

Browse Popular Code Answers by Language