()
| 1128 | |
| 1129 | |
| 1130 | def test_cast_decimal_array_to_features(): |
| 1131 | arr = pa.array([[Decimal(0), Decimal(1)]]) |
| 1132 | assert cast_array_to_feature(arr, List(Value("string"))).type == pa.list_(pa.string()) |
| 1133 | assert cast_array_to_feature(arr, List(Value("string")), allow_primitive_to_str=False).type == pa.list_( |
| 1134 | pa.string() |
| 1135 | ) |
| 1136 | with pytest.raises(TypeError): |
| 1137 | cast_array_to_feature(arr, List(Value("string")), allow_decimal_to_str=False) |
| 1138 | |
| 1139 | |
| 1140 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected