MCPcopy
hub / github.com/pallets/werkzeug / dev_server

Function dev_server

tests/conftest.py:232–244  ·  view source on GitHub ↗

A function that will start a dev server in a subprocess and return a client for interacting with the server.

(tmp_path: Path)

Source from the content-addressed store, hash-verified

230
231@pytest.fixture()
232def dev_server(tmp_path: Path) -> cabc.Iterator[StartDevServer]:
233 """A function that will start a dev server in a subprocess and return a
234 client for interacting with the server.
235 """
236 exit_stack = ExitStack()
237
238 def start_dev_server(name: str = "standard", **kwargs: t.Any) -> DevServerClient:
239 client = DevServerClient(name, tmp_path=tmp_path, **kwargs)
240 exit_stack.enter_context(client) # type: ignore[arg-type]
241 return client
242
243 with exit_stack:
244 yield start_dev_server
245
246
247@pytest.fixture()

Callers 11

test_serverFunction · 0.85
test_ssl_dev_certFunction · 0.85
test_ssl_objectFunction · 0.85
test_reloader_sys_pathFunction · 0.85
test_chunked_requestFunction · 0.85
standard_appFunction · 0.85
test_basicFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected