A function that will start a dev server in a subprocess and return a client for interacting with the server.
(tmp_path: Path)
| 230 | |
| 231 | @pytest.fixture() |
| 232 | def 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() |
no outgoing calls
no test coverage detected