Skip to content

Commit b99b337

Browse files
committed
pydantic 2.4
1 parent d2c2f74 commit b99b337

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tests/otel_integrations/test_anthropic.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,17 @@
2323
from inline_snapshot import snapshot
2424

2525
import logfire
26+
from logfire._internal.utils import get_version
2627
from logfire.testing import TestExporter
2728

29+
pytestmark = [
30+
pytest.mark.skipif(
31+
get_version(pydantic.__version__) < get_version('2.5'),
32+
reason='Requires Pydantic 2.5 or higher to import genai-prices and set operation.cost attribute.',
33+
),
34+
]
35+
36+
2837
ANY_ADAPTER = pydantic.TypeAdapter(Any) # type: ignore
2938

3039

0 commit comments

Comments
 (0)