(image_file)
| 1357 | |
| 1358 | |
| 1359 | def test_embed_array_storage_nested(image_file): |
| 1360 | array = pa.array([[{"bytes": None, "path": image_file}]], type=pa.list_(Image.pa_type)) |
| 1361 | embedded_images_array = embed_array_storage(array, List(Image())) |
| 1362 | assert isinstance(embedded_images_array.to_pylist()[0][0]["path"], str) |
| 1363 | assert isinstance(embedded_images_array.to_pylist()[0][0]["bytes"], bytes) |
| 1364 | array = pa.array([{"foo": {"bytes": None, "path": image_file}}], type=pa.struct({"foo": Image.pa_type})) |
| 1365 | embedded_images_array = embed_array_storage(array, {"foo": Image()}) |
| 1366 | assert isinstance(embedded_images_array.to_pylist()[0]["foo"]["path"], str) |
| 1367 | assert isinstance(embedded_images_array.to_pylist()[0]["foo"]["bytes"], bytes) |
| 1368 | |
| 1369 | |
| 1370 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected