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

Function test_fixed_size_binary

python/pyarrow/tests/test_scalars.py:594–601  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

592
593
594def test_fixed_size_binary():
595 s = pa.scalar(b'foof', type=pa.binary(4))
596 assert isinstance(s, pa.FixedSizeBinaryScalar)
597 assert s.as_py() == b'foof'
598 assert bytes(s) == b'foof'
599
600 with pytest.raises(pa.ArrowInvalid):
601 pa.scalar(b'foof5', type=pa.binary(4))
602
603
604@pytest.mark.parametrize(('ty', 'klass'), [

Callers

nothing calls this directly

Calls 3

bytesFunction · 0.85
as_pyMethod · 0.80
scalarMethod · 0.45

Tested by

no test coverage detected