mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
Added pytest for pydantic protected namespace warning
This commit is contained in:
parent
e1786848cb
commit
a4c7d933a9
1 changed files with 10 additions and 0 deletions
10
litellm/tests/test_pydantic_namespaces.py
Normal file
10
litellm/tests/test_pydantic_namespaces.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
import warnings
|
||||
import pytest
|
||||
|
||||
def test_namespace_conflict_warning():
|
||||
with warnings.catch_warnings(record=True) as recorded_warnings:
|
||||
warnings.simplefilter("always") # Capture all warnings
|
||||
import litellm
|
||||
|
||||
# Check that no warning with the specific message was raised
|
||||
assert not any("conflict with protected namespace" in str(w.message) for w in recorded_warnings), "Test failed: 'conflict with protected namespace' warning was encountered!"
|
Loading…
Add table
Add a link
Reference in a new issue