This is an automated email from the ASF dual-hosted git repository. raulcd pushed a commit to branch maint-15.0.x in repository https://gitbox.apache.org/repos/asf/arrow.git
commit 0d0be3b5a0d233a9287121f3fd5a4c92d7538112 Author: Joris Van den Bossche <[email protected]> AuthorDate: Fri Feb 9 09:04:16 2024 +0100 GH-39999: [Python] Fix tests for pandas with CoW / nightly integration tests (#40000) ### Rationale for this change Fixing a failing test with pandas nightly because of CoW changes. * Closes: #39999 Authored-by: Joris Van den Bossche <[email protected]> Signed-off-by: Joris Van den Bossche <[email protected]> --- python/pyarrow/tests/test_pandas.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/pyarrow/tests/test_pandas.py b/python/pyarrow/tests/test_pandas.py index d15ee82d5d..8fd4b3041b 100644 --- a/python/pyarrow/tests/test_pandas.py +++ b/python/pyarrow/tests/test_pandas.py @@ -3643,7 +3643,8 @@ def test_singleton_blocks_zero_copy(): prior_allocation = pa.total_allocated_bytes() result = t.to_pandas() - assert result['f0'].values.flags.writeable + # access private `_values` because the public `values` is made read-only by pandas + assert result['f0']._values.flags.writeable assert pa.total_allocated_bytes() > prior_allocation
