Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pytest #create #server
ADD COMMENT
Topic
Name
3+3 =