This is an automated email from the ASF dual-hosted git repository.
paleolimbot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-nanoarrow.git
The following commit(s) were added to refs/heads/main by this push:
new 0648ca6a fix(python): Update tests for pyarrow 16 (#440)
0648ca6a is described below
commit 0648ca6a55b47e6b55f416f8ab2b724901ff0043
Author: Dewey Dunnington <[email protected]>
AuthorDate: Mon Apr 22 13:36:38 2024 -0300
fix(python): Update tests for pyarrow 16 (#440)
In pyarrow 16.0.0, per-batch casting is now implemented for array
streams and tables (which invalidates an assumption made in nanoarrow's
tests).
---
python/tests/test_capsules.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/python/tests/test_capsules.py b/python/tests/test_capsules.py
index 92b97d25..926aefa4 100644
--- a/python/tests/test_capsules.py
+++ b/python/tests/test_capsules.py
@@ -116,9 +116,12 @@ def test_array_stream_requested_schema():
pa_table = pa.table({"some_column": pa.array([1, 2, 3], pa.int32())})
schema2 = pa.schema([pa.field("some_column", pa.int64())])
- # Not implemented in pyarrow yet
- with pytest.raises(NotImplementedError):
- na.c_array_stream(pa_table, schema=schema2)
+ try:
+ stream = na.c_array_stream(pa_table, schema=schema2)
+ assert stream.get_schema().child(0).format == "l"
+ except NotImplementedError:
+ # Was not implemented before pyarrow 16.0.0
+ pass
def test_export_invalid():