Skip to content

Commit 26b464d

Browse files
Yun-Kimclaude
andcommitted
test(llama_index): drop redundant _dd_api_key from base llama_index fixture
The base fixture's _dd_api_key override only takes effect for APM-only tests in test_llama_index.py — none of which read it (APM tracing routes through the trace agent, no api_key validation). The llama_index_llmobs fixture sets _dd_api_key independently for LLMObs tests, where the inner override shadows this one. Vestigial from before the llmobs fixture split. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 04bcad2 commit 26b464d

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

tests/contrib/llama_index/conftest.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,16 @@ def llama_index_llmobs(tracer, monkeypatch):
3636

3737
@pytest.fixture
3838
def llama_index():
39-
with override_global_config({"_dd_api_key": "<not-a-real-api_key>"}):
40-
with override_env(
41-
dict(
42-
OPENAI_API_KEY=os.getenv("OPENAI_API_KEY", "<not-a-real-key>"),
43-
)
44-
):
45-
patch()
46-
import llama_index
47-
48-
yield llama_index
49-
unpatch()
39+
with override_env(
40+
dict(
41+
OPENAI_API_KEY=os.getenv("OPENAI_API_KEY", "<not-a-real-key>"),
42+
)
43+
):
44+
patch()
45+
import llama_index
46+
47+
yield llama_index
48+
unpatch()
5049

5150

5251
@pytest.fixture(scope="session")

0 commit comments

Comments
 (0)