Skip to content

Commit 7a6afc9

Browse files
committed
Suppress PydanticAIDeprecationWarning in doc example tests
Doc examples may intentionally use deprecated APIs - ignore the warning rather than forcing all examples to avoid deprecated patterns.
1 parent 40201d0 commit 7a6afc9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/test_examples.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,7 @@ def _check_python_version(min_version: str | None, max_version: str | None) -> N
126126

127127

128128
@pytest.mark.xdist_group(name='doc_tests')
129-
@pytest.mark.filterwarnings( # TODO (v2): Remove this once we drop the deprecated events
130-
'ignore:`BuiltinToolCallEvent` is deprecated', 'ignore:`BuiltinToolResultEvent` is deprecated'
131-
)
129+
@pytest.mark.filterwarnings('ignore::pydantic_ai.exceptions.PydanticAIDeprecationWarning')
132130
@pytest.mark.parametrize('example', find_filter_examples())
133131
def test_docs_examples(
134132
example: CodeExample,

0 commit comments

Comments
 (0)