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

Function test_cast_boolean_array_to_features

tests/test_table.py:1122–1127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1120
1121
1122def test_cast_boolean_array_to_features():
1123 arr = pa.array([[False, True]])
1124 assert cast_array_to_feature(arr, List(Value("string"))).type == pa.list_(pa.string())
1125 assert cast_array_to_feature(arr, List(Value("string")), allow_decimal_to_str=False).type == pa.list_(pa.string())
1126 with pytest.raises(TypeError):
1127 cast_array_to_feature(arr, List(Value("string")), allow_primitive_to_str=False)
1128
1129
1130def test_cast_decimal_array_to_features():

Callers

nothing calls this directly

Calls 3

cast_array_to_featureFunction · 0.90
ListClass · 0.90
ValueClass · 0.90

Tested by

no test coverage detected