mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
chore(tests): match the ValueError message in the fallback assertion
PT011: a bare pytest.raises(ValueError) is too broad. Match the message the fallback actually raises so the test cannot pass on some unrelated ValueError.
This commit is contained in:
parent
cca2c71e8e
commit
da727c90f4
1 changed files with 1 additions and 1 deletions
|
|
@ -1060,5 +1060,5 @@ class TestInferContentTypeQueryString:
|
|||
def test_a_url_with_no_usable_extension_still_raises(self):
|
||||
# The fallback is unchanged: non-image bytes with no known extension
|
||||
# have nothing left to infer from.
|
||||
with pytest.raises(ValueError):
|
||||
with pytest.raises(ValueError, match="Unable to determine content type from URL"):
|
||||
self._infer("https://cdn.example.com/download?id=1.2", b"not-an-image")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue