(set_env_vars)
| 46 | |
| 47 | |
| 48 | def test_load_model_hf_api_model(set_env_vars): |
| 49 | with patch("huggingface_hub.InferenceClient") as huggingface_hub_InferenceClient: |
| 50 | model = load_model("InferenceClientModel", "test_model_id") |
| 51 | assert isinstance(model, InferenceClientModel) |
| 52 | assert model.model_id == "test_model_id" |
| 53 | assert huggingface_hub_InferenceClient.call_count == 1 |
| 54 | assert huggingface_hub_InferenceClient.call_args.kwargs["token"] == "test_hf_api_key" |
| 55 | |
| 56 | |
| 57 | def test_load_model_invalid_model_type(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…