Skip to content

Commit 4660f3b

Browse files
committed
fixes
1 parent a242eb3 commit 4660f3b

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

tests/langchain/test_dynamic_headers.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,7 @@ def test_dynamic_headers_can_override_defaults(self):
332332

333333

334334
class TestOpenInferenceEndToEnd:
335-
def test_outer_span_context_injected_into_request(
336-
self, otel_exporter, llmgw_settings, tracer
337-
):
335+
def test_outer_span_context_injected_into_request(self, otel_exporter, llmgw_settings, tracer):
338336
"""Outer span is the current span; its context is injected into the LLM request.
339337
openinference creates child spans (same trace_id) but doesn't override the
340338
current span context, so get_current_span() returns the outer span."""
@@ -361,9 +359,7 @@ def test_outer_span_context_injected_into_request(
361359
assert format(span.context.trace_id, "032x") == outer_trace_id
362360

363361
@pytest.mark.asyncio
364-
async def test_async_outer_span_context_injected(
365-
self, otel_exporter, llmgw_settings, tracer
366-
):
362+
async def test_async_outer_span_context_injected(self, otel_exporter, llmgw_settings, tracer):
367363
"""Async path: outer span context propagates through ainvoke to the request."""
368364
transport = AsyncRequestCapturingTransport()
369365
chat = _make_chat_with_async_transport(llmgw_settings, transport)
@@ -378,9 +374,7 @@ async def test_async_outer_span_context_injected(
378374
assert transport.last_request_headers.get("x-trace-id") == outer_trace_id
379375
assert transport.last_request_headers.get("x-span-id") == outer_span_id
380376

381-
def test_no_outer_span_no_headers_but_spans_still_created(
382-
self, otel_exporter, llmgw_settings
383-
):
377+
def test_no_outer_span_no_headers_but_spans_still_created(self, otel_exporter, llmgw_settings):
384378
"""Without an outer span, get_current_span() is invalid → no headers injected.
385379
openinference still creates its own root spans for observability."""
386380
transport = RequestCapturingTransport()

0 commit comments

Comments
 (0)