Skip to content

Commit 2369988

Browse files
committed
Skip OTel test when logfire.testing is not available
The lowest-direct CI resolution may not install a logfire version that includes the testing module.
1 parent 54f8787 commit 2369988

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/shared/test_otel.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
from __future__ import annotations
22

33
import pytest
4-
from logfire.testing import CaptureLogfire
54

6-
from mcp.client.client import Client
7-
from mcp.server.mcpserver import MCPServer
5+
logfire_testing = pytest.importorskip("logfire.testing")
6+
CaptureLogfire = logfire_testing.CaptureLogfire
7+
8+
from mcp.client.client import Client # noqa: E402
9+
from mcp.server.mcpserver import MCPServer # noqa: E402
810

911
pytestmark = pytest.mark.anyio
1012

0 commit comments

Comments
 (0)