numpydantic/tests/test_interface/conftest.py

22 lines
520 B
Python
Raw Normal View History

2024-04-09 01:36:47 +00:00
import pytest
import numpy as np
import dask.array as da
from numpydantic import interface
from tests.fixtures import hdf5_array
2024-04-09 01:36:47 +00:00
@pytest.fixture(
scope="function",
params=[
([[1, 2], [3, 4]], interface.NumpyInterface),
(np.zeros((3, 4)), interface.NumpyInterface),
(hdf5_array, interface.H5Interface),
2024-04-09 01:36:47 +00:00
(da.random.random((10, 10)), interface.DaskInterface),
],
ids=["numpy_list", "numpy", "H5ArrayPath", "dask"],
2024-04-09 01:36:47 +00:00
)
def interface_type(request):
return request.param