From 1be07a1d8ecffef7acc285938cfb4cf2c770c926 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Fri, 27 Oct 2023 12:32:37 +0200 Subject: [PATCH] TST: improve test_repr_bytes_61_lines setup to speed up test --- pandas/tests/frame/test_repr_info.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pandas/tests/frame/test_repr_info.py b/pandas/tests/frame/test_repr_info.py index 63ecdfa5e001b..23aef9ba7d18d 100644 --- a/pandas/tests/frame/test_repr_info.py +++ b/pandas/tests/frame/test_repr_info.py @@ -29,12 +29,7 @@ class TestDataFrameReprInfoEtc: def test_repr_bytes_61_lines(self): # GH#12857 lets = list("ACDEFGHIJKLMNOP") - slen = 50 - nseqs = 1000 - words = [ - [np.random.default_rng(2).choice(lets) for x in range(slen)] - for _ in range(nseqs) - ] + words = np.random.default_rng(2).choice(lets, (1000, 50)) df = DataFrame(words).astype("U1") assert (df.dtypes == object).all()