From fb90124fc88823e7482d45d5c7298f0770a01f3a Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Mon, 23 Oct 2023 18:06:32 -0700 Subject: [PATCH] TST: Avoid locals in test_eval --- pandas/tests/computation/test_eval.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pandas/tests/computation/test_eval.py b/pandas/tests/computation/test_eval.py index f336ef34cae0a..2311ce928ee27 100644 --- a/pandas/tests/computation/test_eval.py +++ b/pandas/tests/computation/test_eval.py @@ -917,12 +917,9 @@ def test_complex_series_frame_alignment(self, engine, parser, r1, c1, r2, c2): m1 = 5 m2 = 2 * m1 - index_name = np.random.default_rng(2).choice(["index", "columns"]) - obj_name = np.random.default_rng(2).choice(["df", "df2"]) - df = tm.makeCustomDataframe(m1, n, data_gen_f=f, r_idx_type=r1, c_idx_type=c1) df2 = tm.makeCustomDataframe(m2, n, data_gen_f=f, r_idx_type=r2, c_idx_type=c2) - index = getattr(locals().get(obj_name), index_name) + index = df2.columns ser = Series(np.random.default_rng(2).standard_normal(n), index[:n]) if r2 == "dt" or c2 == "dt":