mirror of
https://github.com/apache/arrow.git
synced 2026-10-29 09:05:47 +08:00
added 'test_buffer_hex' in 'python/pyarrow/tests/test_io.py'
This commit is contained in:
1 parent
a2de6b21d1
commit
dc9b589215
1 file changed
+9
@@ -324,6 +324,15 @@ def test_buffer_invalid():
|
||||
pa.py_buffer(None)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('val, expected_hex_buffer',
|
||||
[(b'check', b'636865636B'),
|
||||
(b'\a0', b'0730'),
|
||||
(b'', b'')])
|
||||
def test_buffer_hex(val, expected_hex_buffer):
|
||||
buf = pa.py_buffer(val)
|
||||
assert buf.hex() == expected_hex_buffer
|
||||
|
||||
|
||||
def test_buffer_to_numpy():
|
||||
# Make sure creating a numpy array from an arrow buffer works
|
||||
byte_array = bytearray(20)
|
||||
|
||||
Reference in new issue
Block a user