From: Debian Science Team Date: Tue, 28 Jan 2025 22:18:06 +0000 (+0000) Subject: Avoid test crash X-Git-Tag: archive/raspbian/2.2.3+dfsg-7+rpi1^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7c48a19d5d9fd294124725cf69fa5cab25eb289b;p=pandas.git Avoid test crash First seen on numpy2 transition, unknown if actually related to that Author: Matthew Roeschke Origin: upstream pull 60416 Forwarded: not-needed Gbp-Pq: Name value_counts_nat_numpy2.patch --- diff --git a/pandas/tests/test_algos.py b/pandas/tests/test_algos.py index 9f0a197c..a7873be3 100644 --- a/pandas/tests/test_algos.py +++ b/pandas/tests/test_algos.py @@ -1281,7 +1281,7 @@ class TestValueCounts: result_dt = algos.value_counts(dt) tm.assert_series_equal(result_dt, exp_dt) - exp_td = Series({np.timedelta64(10000): 1}, name="count") + exp_td = Series([1], index=[np.timedelta64(10000)], name="count") with tm.assert_produces_warning(FutureWarning, match=msg): result_td = algos.value_counts(td) tm.assert_series_equal(result_td, exp_td)