(monkeypatch, caplog)
| 241 | |
| 242 | |
| 243 | async def test_startup_err(monkeypatch, caplog) -> None: |
| 244 | async def _raise(*_): |
| 245 | raise OSError("cannot bind") |
| 246 | |
| 247 | monkeypatch.setattr(asyncio, "start_server", _raise) |
| 248 | |
| 249 | ps = Proxyserver() |
| 250 | with taddons.context(ps): |
| 251 | assert not await ps.setup_servers() |
| 252 | assert "cannot bind" in caplog.text |
| 253 | |
| 254 | |
| 255 | async def test_shutdown_err(caplog_async) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…