()
| 292 | |
| 293 | |
| 294 | def test_GenerationResultBase(): |
| 295 | sampling_params = SamplingParams(max_tokens=4) |
| 296 | result = GenerationResultBase( |
| 297 | id=2, |
| 298 | sampling_params=sampling_params, |
| 299 | ) |
| 300 | result._handle_response(create_rsp(2, finished=False)) |
| 301 | result._handle_response(create_rsp(3, finished=False)) |
| 302 | result._handle_response(create_rsp(4, finished=True)) |
| 303 | print(result.outputs[0]) |
| 304 | assert len(result.outputs[0].token_ids) == 3 |
| 305 | assert result._done |
| 306 | |
| 307 | |
| 308 | def test_GenerationResult(): |
nothing calls this directly
no test coverage detected