Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
d9a55204
Unverified
Commit
d9a55204
authored
Aug 23, 2025
by
Aziz
Committed by
GitHub
Aug 23, 2025
Browse files
fix(tests): Correct unreachable assertion in truncation test (#23425)
Signed-off-by:
AzizCode92
<
azizbenothman76@gmail.com
>
parent
b4e9fd81
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
tests/entrypoints/openai/test_truncation.py
tests/entrypoints/openai/test_truncation.py
+9
-12
No files found.
tests/entrypoints/openai/test_truncation.py
View file @
d9a55204
...
@@ -74,18 +74,15 @@ async def test_bigger_truncation_size(client: openai.AsyncOpenAI):
...
@@ -74,18 +74,15 @@ async def test_bigger_truncation_size(client: openai.AsyncOpenAI):
}
}
with
pytest
.
raises
(
openai
.
BadRequestError
)
as
err
:
with
pytest
.
raises
(
openai
.
BadRequestError
)
as
err
:
err
=
await
client
.
post
(
path
=
"embeddings"
,
await
client
.
post
(
path
=
"embeddings"
,
cast_to
=
object
,
body
=
{
**
kwargs
})
cast_to
=
object
,
body
=
{
**
kwargs
})
assert
err
.
value
.
status_code
==
400
error_details
=
err
.
value
.
response
.
json
()[
"error"
]
assert
str
(
err
)
==
f
"""openai.BadRequestError:
assert
error_details
[
"type"
]
==
"BadRequestError"
Error code: 400 - {{'object': 'error',
expected_message
=
(
"truncate_prompt_tokens value is "
'message': 'truncate_prompt_tokens value
"greater than max_model_len."
(
{
truncation_size
}
)
" Please, select a smaller truncation size."
)
is greater than max_model_len (
{
max_model_len
}
).
assert
error_details
[
"message"
]
==
expected_message
Please, select a smaller truncation size.',
'type': 'BadRequestError',
'param': None, 'code': 400}}"""
@
pytest
.
mark
.
asyncio
@
pytest
.
mark
.
asyncio
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment