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

Function test_partition_nth

python/pyarrow/tests/test_compute.py:3136–3148  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3134
3135
3136def test_partition_nth():
3137 data = list(range(100, 140))
3138 random.shuffle(data)
3139 pivot = 10
3140 indices = pc.partition_nth_indices(data, pivot=pivot)
3141 check_partition_nth(data, indices, pivot, "at_end")
3142 # Positional pivot argument
3143 assert pc.partition_nth_indices(data, pivot) == indices
3144
3145 with pytest.raises(
3146 ValueError,
3147 match="'partition_nth_indices' cannot be called without options"):
3148 pc.partition_nth_indices(data)
3149
3150
3151def test_partition_nth_null_placement():

Callers

nothing calls this directly

Calls 2

listFunction · 0.85
check_partition_nthFunction · 0.85

Tested by

no test coverage detected