참고소스 수정본
This commit is contained in:
16
참고/instructor-main/tests/llm/test_anthropic/conftest.py
Normal file
16
참고/instructor-main/tests/llm/test_anthropic/conftest.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# conftest.py
|
||||
import os
|
||||
import pytest
|
||||
import importlib.util
|
||||
|
||||
|
||||
if not os.getenv("ANTHROPIC_API_KEY"):
|
||||
pytest.skip(
|
||||
"ANTHROPIC_API_KEY environment variable not set",
|
||||
allow_module_level=True,
|
||||
)
|
||||
|
||||
if (
|
||||
importlib.util.find_spec("anthropic") is None
|
||||
): # pragma: no cover - optional dependency
|
||||
pytest.skip("anthropic package is not installed", allow_module_level=True)
|
||||
Reference in New Issue
Block a user