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

Function test_fixed_size_binary

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

Source from the content-addressed store, hash-verified

591
592
593def test_fixed_size_binary():
594 s = pa.scalar(b'foof', type=pa.binary(4))
595 assert isinstance(s, pa.FixedSizeBinaryScalar)
596 assert s.as_py() == b'foof'
597 assert bytes(s) == b'foof'
598
599 with pytest.raises(pa.ArrowInvalid):
600 pa.scalar(b'foof5', type=pa.binary(4))
601
602
603@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