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
dynamo
Commits
87ac404e
Unverified
Commit
87ac404e
authored
Mar 12, 2026
by
Graham King
Committed by
GitHub
Mar 12, 2026
Browse files
test: Fix cancellation test (#7296)
Signed-off-by:
Graham King
<
grahamk@nvidia.com
>
parent
bb43fada
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
lib/bindings/python/tests/cancellation/test_cancellation.py
lib/bindings/python/tests/cancellation/test_cancellation.py
+10
-5
No files found.
lib/bindings/python/tests/cancellation/test_cancellation.py
View file @
87ac404e
...
...
@@ -7,7 +7,11 @@ import pytest
from
dynamo.runtime
import
Context
pytestmark
=
pytest
.
mark
.
pre_merge
pytestmark
=
[
pytest
.
mark
.
gpu_0
,
pytest
.
mark
.
pre_merge
,
pytest
.
mark
.
unit
,
]
class
MockServer
:
...
...
@@ -247,7 +251,9 @@ async def test_server_context_cancel(temp_file_store, server, client):
except
ValueError
as
e
:
# Verify the expected cancellation exception is received
# TODO: Should this be a asyncio.CancelledError?
assert
str
(
e
).
startswith
(
"Stream ended before generation completed"
)
assert
str
(
e
).
startswith
(
"Disconnected: Stream ended before generation completed"
)
# Verify server context cancellation status
assert
handler
.
context_is_stopped
...
...
@@ -272,9 +278,8 @@ async def test_server_raise_cancelled(temp_file_store, server, client):
except
ValueError
as
e
:
# Verify the expected cancellation exception is received
# TODO: Should this be a asyncio.CancelledError?
assert
(
str
(
e
)
==
"a python exception was caught while processing the async generator: CancelledError: "
assert
str
(
e
).
endswith
(
"a python exception was caught while processing the async generator: CancelledError: "
)
# Verify server context cancellation status
...
...
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