Skip to content

Commit

Permalink
Cherry pick
Browse files Browse the repository at this point in the history
  • Loading branch information
kingcrimsontianyu committed Nov 20, 2024
1 parent 5ff93bc commit 2ccd3f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/kvikio/tests/test_async_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ def test_read_write(tmp_path, size):
assert f.raw_write_async(a, stream.ptr).check_bytes_done() == a.nbytes

# Try to read file opened in write-only mode
with pytest.raises(RuntimeError, match="Operation not permitted"):
# POSIX read would yield the error "Operation not permitted"
# cuFile read would yield the error "unsupported file open flags"
with pytest.raises(RuntimeError, match="Operation not permitted|unsupported file open flags"):
# The exception is raised when we call the raw_read_async API.
future_stream = f.raw_read_async(a, stream.ptr)
future_stream.check_bytes_done()
Expand Down

0 comments on commit 2ccd3f8

Please sign in to comment.