We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 979af2d commit f767a1fCopy full SHA for f767a1f
1 file changed
python/tests/test_dataframe.py
@@ -1725,9 +1725,11 @@ def test_arrow_c_stream_capsule_released(ctx):
1725
reader = pa.RecordBatchReader._import_from_c_capsule(capsule)
1726
reader.read_all()
1727
1728
- # After import the capsule no longer exposes the pointer
1729
- with pytest.raises(ValueError):
1730
- get_ptr(capsule, b"arrow_array_stream")
+ # After import, PyArrow takes ownership and resets the destructor
+ assert get_destructor(capsule) == 0
+
1731
+ # Pointer remains retrievable
1732
+ assert get_ptr(capsule, b"arrow_array_stream")
1733
pyerr_clear()
1734
1735
0 commit comments