(
device,
roi_start,
rel_roi_start,
roi_end,
rel_roi_end,
roi_shape,
rel_roi_shape,
roi_axes,
out_of_bounds_policy,
fill_value,
)
| 934 | |
| 935 | @params(*list(_get_roi_error_params())) |
| 936 | def test_numpy_reader_roi_error( |
| 937 | device, |
| 938 | roi_start, |
| 939 | rel_roi_start, |
| 940 | roi_end, |
| 941 | rel_roi_end, |
| 942 | roi_shape, |
| 943 | rel_roi_shape, |
| 944 | roi_axes, |
| 945 | out_of_bounds_policy, |
| 946 | fill_value, |
| 947 | ): |
| 948 | # setup file |
| 949 | shapes = [(10, 10), (12, 10), (10, 12), (20, 15), (10, 11), (12, 11), (13, 11), (19, 10)] |
| 950 | ndim = 2 |
| 951 | dtype = np.uint8 |
| 952 | batch_size = 8 |
| 953 | file_filter = "*.npy" |
| 954 | fortran_order = False |
| 955 | |
| 956 | with tempfile.TemporaryDirectory(prefix=gds_data_root) as test_data_root: |
| 957 | index = 0 |
| 958 | for sh in shapes: |
| 959 | filename = os.path.join(test_data_root, "test_{:02d}.npy".format(index)) |
| 960 | index += 1 |
| 961 | create_numpy_file(filename, sh, dtype, fortran_order=fortran_order) |
| 962 | |
| 963 | _testimpl_numpy_reader_roi_error( |
| 964 | test_data_root, |
| 965 | batch_size, |
| 966 | ndim, |
| 967 | dtype, |
| 968 | device, |
| 969 | fortran_order, |
| 970 | file_filter, |
| 971 | roi_start, |
| 972 | rel_roi_start, |
| 973 | roi_end, |
| 974 | rel_roi_end, |
| 975 | roi_shape, |
| 976 | rel_roi_shape, |
| 977 | roi_axes, |
| 978 | out_of_bounds_policy, |
| 979 | fill_value, |
| 980 | ) |
| 981 | |
| 982 | |
| 983 | @cartesian_params(("cpu", "gpu"), ((1, 2, 1), (3, 1, 2)), (True, False), (True, False)) |
nothing calls this directly
no test coverage detected