Skip to content

Commit c3e9927

Browse files
Update cuda_core/tests/test_stream.py
Co-authored-by: Leo Fang <[email protected]>
1 parent e31eae4 commit c3e9927

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

cuda_core/tests/test_stream.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,11 @@ def test_stream_record_invalid_event(init_cuda):
5151
stream.record(event="invalid_event")
5252

5353
def test_stream_wait_event(init_cuda):
54-
stream = Device().create_stream(options=StreamOptions())
55-
event = Event._init()
56-
stream.record(event)
57-
stream.wait(event) # Should not raise any exceptions
54+
s1 = Device().create_stream()
55+
s2 = Device().create_stream()
56+
e1 = s1.record()
57+
s2.wait(e1) # Should not raise any exceptions
58+
s2.sync()
5859

5960
def test_stream_wait_invalid_event(init_cuda):
6061
stream = Device().create_stream(options=StreamOptions())

0 commit comments

Comments
 (0)