GH-<id>: [Python] Assert assume_timezone nonexistent/ambiguous results in test_compute#50368
Draft
anxkhn wants to merge 1 commit into
Draft
GH-<id>: [Python] Assert assume_timezone nonexistent/ambiguous results in test_compute#50368anxkhn wants to merge 1 commit into
anxkhn wants to merge 1 commit into
Conversation
Four comparisons in test_assume_timezone computed a result with .equals() but dropped the assert, so the boolean was discarded and nothing was verified. As a result the assume_timezone kernel's DST nonexistent (shift_forward/shift_backward) and ambiguous (earliest/latest) output branches were exercised but never checked, letting a regression pass. Prefix the four bare comparisons with assert, matching the assert result.equals(pa.array(expected)) form already used earlier in the same test.
|
Thanks for opening a pull request! If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project. Then could you also rename the pull request title in the following format? or See also: |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes test_assume_timezone in python/pyarrow/tests/test_compute.py so that four previously non-asserted .equals() comparisons actually validate the assume_timezone results for DST-nonexistent and DST-ambiguous inputs.
Changes:
- Add missing
assertkeywords for two nonexistent-time (shift_forward/shift_backward) result comparisons. - Add missing
assertkeywords for two ambiguous-time (earliest / latest) result comparisons.
Member
|
Please read https://arrow.apache.org/docs/dev/developers/overview.html carefully and try again. |
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.
Notes on the PR body:
guidance asks for. Keep it: the policy explicitly wants authors to "be upfront
about AI usage." It leaks nothing about the local environment.
not ping maintainers).
Signed-off-by; do not commitwith
-s.The diff (for reference)
Local commit message (already on the branch, Conventional Commits, leak-clean):
(The commit subject uses the
test(python):Conventional-Commits form for localhistory; the upstream PR title must be the
GH-<id>: [Python] ...form above.Arrow's squash-merge takes the PR title + body as the final commit message, so the
local subject is not what lands on main.)