Repository navigation
GH-55486: [Python] Make test_asarray run and update it to the current Scalar API - #55585
Merged
Merged
Conversation
|
|
|
|
tadeja
reviewed
Nov 23, 2026
tadeja
reviewed
Nov 23, 2026
tadeja
left a comment
Member
There was a problem hiding this comment.
Thanks, @AFOliveira!
Just found we have the same problem for another test and it'd be good to resolve it with this PR as well. Could you add a similar change there?
diff --git a/python/pyarrow/tests/test_table.py b/python/pyarrow/tests/test_table.py
@@ -420,10 +420,10 @@ def test_to_pandas_empty_table():
tm.assert_frame_equal(result, df.iloc[:0])
-@pytest.mark.pandas
-@pytest.mark.nopandas
+@pytest.mark.numpy
def test_chunked_array_asarray():
- # ensure this is tested both when pandas is present or not (ARROW-6564)
+ # no pandas mark: ...
Member
|
@AFOliveira do you wish to continue this PR and could you rebase and apply my suggestion? Otherwise, I'd go ahead with that tomorrow. |
…urrent Scalar API Use the NumPy marker for test_asarray and test_chunked_array_asarray so both tests run with or without pandas. Convert the Arrow scalars with as_py() before comparing them to Python integers.
AFOliveira
force-pushed
the
riscv/arrow
branch
from
December 1, 2026 22:31
ab04d0c to
b33daf4
Compare
Contributor
Author
|
Fixed, thanks for your time! |
Member
|
@AFOliveira that's great. I've edited PR description a bit, merging now. Please also comment on the issue #55486 so ti can be assigned to you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
test_asarrayandtest_chunked_array_asarrayare marked bothpandasandnopandas. Exactly one of those groups is enabled in any run, so both tests are always skipped.test_asarraybody has gone stale meanwhile: it uses the removedInt64Valuealias and compares Scalars with Python ints. (Edit: replacing Int64Value -> Int64Scalar already done in #55264)What changes are included in this PR?
@pytest.mark.numpy, so the tests run with and without pandas. On bothtest_asarrayandtest_chunked_array_asarray.as_py()).Are these changes tested?
The change is to a test. On x86-64 against the 26.0.1 wheel, the old body fails at the
tolist()assertion and the new test passes.Edit: Rebased after #55264 merged. Also CI tests pass now.
Are there any user-facing changes?
No.
Was AI used for this PR?
PR code and description written by:
Reviewed before submission by: