Skip to content

Commit 7811065

Browse files
committed
Fix test_is_done without a sync
Event might not have yet completed when a synchronize is skipped
1 parent ddc1f94 commit 7811065

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cuda_core/tests/test_event.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,6 @@ def test_is_done(init_cuda):
4343
options = EventOptions(enable_timing=False)
4444
stream = Device().create_stream()
4545
event = stream.record(options=options)
46-
assert event.is_done is True
46+
# Without a sync, the captured work might not have yet completed
47+
# Therefore this check should never raise an exception
48+
assert event.is_done in (True, False)

0 commit comments

Comments
 (0)