(self, monkeypatch: pytest.MonkeyPatch)
| 319 | assert base_url == expected_url |
| 320 | |
| 321 | def test_select_openai(self, monkeypatch: pytest.MonkeyPatch) -> None: |
| 322 | monkeypatch.setenv("SKILLSPECTOR_PROVIDER", "openai") |
| 323 | monkeypatch.setenv("OPENAI_API_KEY", "sk-x") |
| 324 | # NVIDIA env set but ignored when SKILLSPECTOR_PROVIDER=openai. |
| 325 | monkeypatch.setenv("NVIDIA_INFERENCE_KEY", "should-be-ignored") |
| 326 | creds = resolve_provider_credentials() |
| 327 | assert creds == ("sk-x", None) |
| 328 | assert isinstance(get_metadata_provider(), OpenAIProvider) |
| 329 | |
| 330 | def test_select_anthropic(self, monkeypatch: pytest.MonkeyPatch) -> None: |
| 331 | monkeypatch.setenv("SKILLSPECTOR_PROVIDER", "anthropic") |
nothing calls this directly
no test coverage detected