AlenkaF commented on code in PR #45818: URL: https://github.com/apache/arrow/pull/45818#discussion_r2063595348
########## python/pyarrow/tests/test_scalars.py: ########## @@ -577,6 +607,13 @@ def test_binary(value, ty, scalar_typ): assert memview.strides == (1,) +def test_binary_null(): + s = pa.scalar(None, type=pa.binary()) + assert s.as_py() is None + with pytest.raises(TypeError): + memoryview(s) Review Comment: This part can be moved in the `test_binary` with type being parametrised with `ty` parameter. What about an empty string scalar `pa.scalar("", type=pa.binary())`? Can we add this to the test also? I think this should hold: ```python assert buffer.len == 0 assert memview == "" ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org