Copilot commented on code in PR #50368:
URL: https://github.com/apache/arrow/pull/50368#discussion_r3659661124
##########
python/pyarrow/tests/test_compute.py:
##########
@@ -2797,17 +2797,17 @@ def test_assume_timezone():
pc.assume_timezone(nonexistent_array,
options=options_nonexistent_raise)
- expected = pa.array(nonexistent.tz_localize(
- timezone, nonexistent="shift_forward"))
result = pc.assume_timezone(
nonexistent_array, options=options_nonexistent_latest)
- expected.equals(result)
-
expected = pa.array(nonexistent.tz_localize(
- timezone, nonexistent="shift_backward"))
+ timezone, nonexistent="shift_forward"), type=result.type)
Review Comment:
Using `type=result.type` when building the expected array makes the test’s
expectation depend on the kernel output type and can mask regressions (e.g.,
wrong timestamp unit). Prefer an explicit expected type derived from the test
inputs (ns + tz).
This issue also appears in the following locations of the same file:
- line 2808
- line 2825
- line 2831
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]