(caplog)
| 137 | |
| 138 | |
| 139 | def test_receive_output_logs_exception(caplog): |
| 140 | llm = _make_llm(_make_engine()) |
| 141 | calls = iter([RuntimeError("boom"), SystemExit()]) |
| 142 | |
| 143 | def _get_generated_result(): |
| 144 | nxt = next(calls) |
| 145 | if isinstance(nxt, BaseException): |
| 146 | raise nxt |
| 147 | return nxt |
| 148 | |
| 149 | llm.llm_engine._get_generated_result = _get_generated_result |
| 150 | with pytest.raises(SystemExit): |
| 151 | llm._receive_output() |
| 152 | assert "Unexcepted error happened" in caplog.text |
| 153 | |
| 154 | |
| 155 | def test_generate_and_chat_branches(): |
nothing calls this directly
no test coverage detected