From 7c48a19d5d9fd294124725cf69fa5cab25eb289b Mon Sep 17 00:00:00 2001 From: Debian Science Team Date: Tue, 28 Jan 2025 22:18:06 +0000 Subject: [PATCH] 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 --- pandas/tests/test_algos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.30.2