Skip to content

GH-55486: [Python] Make test_asarray run and update it to the current Scalar API - #55585

Open
AFOliveira wants to merge 1 commit into
apache:mainfrom
AFOliveira:riscv/arrow
Open

AFOliveira wants to merge 1 commit into
apache:mainfrom
AFOliveira:riscv/arrow

Conversation

@AFOliveira

@AFOliveira AFOliveira commented Nov 13, 2026 •

Copy link
Copy Markdown

Rationale for this change

test_asarray is marked both pandas and nopandas. Exactly one of those groups is enabled in any run, so the test is always skipped. Its body has gone stale meanwhile: it uses the removed Int64Value alias and compares Scalars with Python ints.

What changes are included in this PR?

  • Replace the two marks with @pytest.mark.numpy, so the test runs with and without pandas.
  • Update the body to the current Scalar API (as_py(), pa.Int64Scalar).

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. Not run against a build of main.

#55264 touches the same lines of this test.

Are there any user-facing changes?

No.

Was AI used for this PR?

PR code and description written by:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

…urrent Scalar API

test_asarray is marked both pandas and nopandas. Exactly one of those
groups is enabled in any run, so the test is always skipped. Its body
has gone stale meanwhile: it uses the removed Int64Value alias and
compares Scalars with Python ints.

Replace the two marks with the numpy mark, so the test runs with and
without pandas, and update the body to the current Scalar API.

Checked on x86-64 against the 26.0.1 wheel: the old body fails at the
tolist() assertion, the new test passes.
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #55486 has been automatically assigned in GitHub to PR creator.

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #55486 has been automatically assigned in GitHub to PR creator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant