Improve pytest warning filters for Pydantic serializer warnings

- Added more specific filter for Pydantic serializer warnings from mock server
- Filters both by message pattern and module to ensure all warnings are suppressed
- Cleaner CI output for memory leak tests
This commit is contained in:
Alexsander Hamir 2026-01-09 17:18:13 -08:00
parent 8177ce107b
commit a03fbd5188

View file

@ -184,7 +184,9 @@ markers = [
]
filterwarnings = [
# Suppress Pydantic serializer warnings from mock server responses (non-critical for memory tests)
"ignore:.*PydanticSerializationUnexpectedValue.*:UserWarning:pydantic.main",
# These occur because the mock server returns a simplified response format
"ignore:Pydantic serializer warnings:UserWarning",
"ignore::UserWarning:pydantic.main",
# Suppress pytest-asyncio event loop deprecation warning (handled automatically by pytest-asyncio)
"ignore:.*unclosed event loop.*:DeprecationWarning:pytest_asyncio.plugin",
"ignore::DeprecationWarning:pytest_asyncio.plugin",
]