(monkeypatch)
| 94 | |
| 95 | |
| 96 | def test_init_tool_parser_plugin(monkeypatch): |
| 97 | captured = {} |
| 98 | engine = _make_engine() |
| 99 | |
| 100 | class DummyThread: |
| 101 | def __init__(self, target, daemon): |
| 102 | self.target = target |
| 103 | |
| 104 | def start(self): |
| 105 | return None |
| 106 | |
| 107 | monkeypatch.setattr(llm_module, "deprecated_kwargs_warning", lambda **_: None) |
| 108 | monkeypatch.setattr(llm_module, "retrive_model_from_server", lambda model, rev: model) |
| 109 | monkeypatch.setattr( |
| 110 | llm_module.ToolParserManager, "import_tool_parser", lambda name: captured.setdefault("p", name) |
| 111 | ) |
| 112 | monkeypatch.setattr(llm_module, "EngineArgs", lambda **kwargs: SimpleNamespace(**kwargs)) |
| 113 | monkeypatch.setattr(llm_module.LLMEngine, "from_engine_args", lambda engine_args: engine) |
| 114 | monkeypatch.setattr(llm_module, "load_chat_template", lambda template, model: "tmpl") |
| 115 | monkeypatch.setattr(llm_module.threading, "Thread", DummyThread) |
| 116 | llm = LLM(model="m", tool_parser_plugin="plugin") |
| 117 | assert captured["p"] == "plugin" |
| 118 | assert llm.master_node_ip == "127.0.0.1" |
| 119 | |
| 120 | |
| 121 | def test_receive_output_merges(): |
nothing calls this directly
no test coverage detected