MCPcopy Create free account
hub / github.com/apache/arrow / test_table_like_slice_integer_scalars

Function test_table_like_slice_integer_scalars

python/pyarrow/tests/test_table.py:1384–1395  ·  view source on GitHub ↗
(factory, scalar_type)

Source from the content-addressed store, hash-verified

1382 pa.uint8(), pa.uint16(), pa.uint32(), pa.uint64(),
1383])
1384def test_table_like_slice_integer_scalars(factory, scalar_type):
1385 data = [pa.array(range(10))]
1386 names = ["c0"]
1387 if factory is pa.chunked_array:
1388 obj = factory(data)
1389 else:
1390 obj = factory(data, names=names)
1391 offsets = pa.array([2, 4], type=scalar_type)
1392
1393 result = obj.slice(offsets[0], offsets[1])
1394
1395 assert result.equals(obj.slice(2, 4))
1396
1397
1398@pytest.mark.parametrize("factory", [

Callers

nothing calls this directly

Calls 4

factoryFunction · 0.85
equalsMethod · 0.80
arrayMethod · 0.45
sliceMethod · 0.45

Tested by

no test coverage detected