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

Function test_convert_with_mask

python/pyarrow/tests/test_convert_builtin.py:526–537  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

524
525
526def test_convert_with_mask():
527 data = [1, 2, 3, 4, 5]
528 mask = [False, True, False, False, True]
529
530 result = pa.array(data, mask=mask)
531 expected = pa.array([1, None, 3, 4, None])
532
533 assert result.equals(expected)
534
535 # Mask wrong length
536 with pytest.raises(ValueError):
537 pa.array(data, mask=mask[1:])
538
539
540def test_garbage_collection():

Callers

nothing calls this directly

Calls 2

equalsMethod · 0.80
arrayMethod · 0.45

Tested by

no test coverage detected