MCPcopy
hub / github.com/nonebot/nonebot2 / server

Function server

tests/conftest.py:90–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88
89@pytest.fixture(scope="session", autouse=True)
90def server() -> Generator[BaseWSGIServer, None, None]:
91 server = make_server("127.0.0.1", 0, app=request_handler)
92 thread = threading.Thread(target=server.serve_forever)
93 thread.start()
94 try:
95 yield server
96 finally:
97 server.shutdown()
98 thread.join()
99
100
101@pytest.fixture(scope="session")

Callers

nothing calls this directly

Calls 2

shutdownMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected