Skip to content

Commit 5622b1b

Browse files
authored
TST: Avoid locals in test_eval (#55656)
1 parent d3956ec commit 5622b1b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pandas/tests/computation/test_eval.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -917,12 +917,9 @@ def test_complex_series_frame_alignment(self, engine, parser, r1, c1, r2, c2):
917917
m1 = 5
918918
m2 = 2 * m1
919919

920-
index_name = np.random.default_rng(2).choice(["index", "columns"])
921-
obj_name = np.random.default_rng(2).choice(["df", "df2"])
922-
923920
df = tm.makeCustomDataframe(m1, n, data_gen_f=f, r_idx_type=r1, c_idx_type=c1)
924921
df2 = tm.makeCustomDataframe(m2, n, data_gen_f=f, r_idx_type=r2, c_idx_type=c2)
925-
index = getattr(locals().get(obj_name), index_name)
922+
index = df2.columns
926923
ser = Series(np.random.default_rng(2).standard_normal(n), index[:n])
927924

928925
if r2 == "dt" or c2 == "dt":

0 commit comments

Comments
 (0)