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

Function test_sequence_integer

python/pyarrow/tests/test_convert_builtin.py:366–375  ·  view source on GitHub ↗
(seq, np_scalar_pa_type)

Source from the content-addressed store, hash-verified

364@parametrize_with_sequence_types
365@pytest.mark.parametrize("np_scalar_pa_type", int_type_pairs)
366def test_sequence_integer(seq, np_scalar_pa_type):
367 np_str_scalar, pa_type = np_scalar_pa_type
368 np_scalar = getattr(np, np_str_scalar)
369 expected = [1, None, 3, None,
370 np.iinfo(np_scalar).min, np.iinfo(np_scalar).max]
371 arr = pa.array(seq(expected), type=pa_type)
372 assert len(arr) == 6
373 assert arr.null_count == 2
374 assert arr.type == pa_type
375 assert arr.to_pylist() == expected
376
377
378@pytest.mark.numpy

Callers

nothing calls this directly

Calls 2

lenFunction · 0.85
arrayMethod · 0.45

Tested by

no test coverage detected