Skip to content

Commit

Permalink
test_http_io
Browse files Browse the repository at this point in the history
  • Loading branch information
madsbk committed Sep 24, 2024
1 parent dff0cb4 commit 946e87a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions python/kvikio/tests/test_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

import pytest

import kvikio

benchmarks_path = (
Path(os.path.realpath(__file__)).parent.parent / "kvikio" / "benchmarks"
)
Expand Down Expand Up @@ -78,3 +80,31 @@ def test_zarr_io(run_cmd, tmp_path, api):
cwd=benchmarks_path,
)
assert retcode == 0


@pytest.mark.parametrize(
"api",
[
"cupy-kvikio",
"numpy-kvikio",
],
)
def test_http_io(run_cmd, tmp_path, api):
"""Test benchmarks/http_io.py"""

if not kvikio.is_remote_file_available():
pytest.skip(
"cannot test remote IO, please build KvikIO with with AWS S3 support"
)
retcode = run_cmd(
cmd=[
sys.executable,
"http_io.py",
"-n",
"1000",
"--api",
api,
],
cwd=benchmarks_path,
)
assert retcode == 0

0 comments on commit 946e87a

Please sign in to comment.