MCPcopy Index your code
hub / github.com/huggingface/datasets / test_embed_array_storage

Function test_embed_array_storage

tests/test_table.py:1351–1356  ·  view source on GitHub ↗
(image_file)

Source from the content-addressed store, hash-verified

1349
1350
1351def test_embed_array_storage(image_file):
1352 array = pa.array([{"bytes": None, "path": image_file}], type=Image.pa_type)
1353 embedded_images_array = embed_array_storage(array, Image())
1354 assert isinstance(embedded_images_array.to_pylist()[0]["path"], str)
1355 assert embedded_images_array.to_pylist()[0]["path"] == "test_image_rgb.jpg"
1356 assert isinstance(embedded_images_array.to_pylist()[0]["bytes"], bytes)
1357
1358
1359def test_embed_array_storage_nested(image_file):

Callers

nothing calls this directly

Calls 3

embed_array_storageFunction · 0.90
ImageClass · 0.90
to_pylistMethod · 0.45

Tested by

no test coverage detected