(caplog_async)
| 253 | |
| 254 | |
| 255 | async def test_shutdown_err(caplog_async) -> None: |
| 256 | caplog_async.set_level("INFO") |
| 257 | |
| 258 | async def _raise(*_): |
| 259 | raise OSError("cannot close") |
| 260 | |
| 261 | ps = Proxyserver() |
| 262 | with taddons.context(ps) as tctx: |
| 263 | tctx.configure(ps, listen_host="127.0.0.1", listen_port=0) |
| 264 | assert await ps.setup_servers() |
| 265 | ps.running() |
| 266 | assert ps.servers |
| 267 | for server in ps.servers: |
| 268 | setattr(server, "stop", _raise) |
| 269 | tctx.configure(ps, server=False) |
| 270 | await caplog_async.await_log("cannot close") |
| 271 | await _wait_for_connection_closes(ps) |
| 272 | |
| 273 | |
| 274 | async def lookup_ipv4(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…