From 7079ee427ee8d58b0734ce98c82fa2bbfb066278 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Sun, 11 Jun 2023 19:28:29 -0700 Subject: [PATCH] TST: Refactor slow test --- pandas/tests/test_algos.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pandas/tests/test_algos.py b/pandas/tests/test_algos.py index 6d09488df06e2..beddd59b0aa14 100644 --- a/pandas/tests/test_algos.py +++ b/pandas/tests/test_algos.py @@ -536,11 +536,9 @@ def test_objects(self): assert isinstance(result, np.ndarray) def test_object_refcount_bug(self): - lst = ["A", "B", "C", "D", "E"] - msg = "unique with argument that is not not a Series" - with tm.assert_produces_warning(FutureWarning, match=msg): - for i in range(1000): - len(algos.unique(lst)) + lst = np.array(["A", "B", "C", "D", "E"], dtype=object) + for i in range(1000): + len(algos.unique(lst)) def test_on_index_object(self): mindex = MultiIndex.from_arrays(