Skip to content

Commit 22787b9

Browse files
committed
chore: skip anthropic based tests if key is not set
Signed-off-by: Donnie Adams <[email protected]>
1 parent f8eb390 commit 22787b9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/test_gptscript.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ async def test_list_models(gptscript):
116116

117117

118118
@pytest.mark.asyncio
119+
@pytest.mark.skipif(os.environ.get("ANTHROPIC_API_KEY") is None, reason="ANTHROPIC_API_KEY not set")
119120
async def test_list_models_from_provider(gptscript):
120121
models = await gptscript.list_models(
121122
providers=["github.com/gptscript-ai/claude3-anthropic-provider"],
@@ -128,6 +129,7 @@ async def test_list_models_from_provider(gptscript):
128129

129130

130131
@pytest.mark.asyncio
132+
@pytest.mark.skipif(os.environ.get("ANTHROPIC_API_KEY") is None, reason="ANTHROPIC_API_KEY not set")
131133
async def test_list_models_from_default_provider():
132134
g = GPTScript(GlobalOptions(defaultModelProvider="github.com/gptscript-ai/claude3-anthropic-provider"))
133135
try:

0 commit comments

Comments
 (0)