Skip to content

Commit 33b780a

Browse files
Jammy2211claude
authored andcommitted
Fix off-by-one variable names in test__lp_linear_func_galaxy_dict_from
The test sets up galaxy_linear_2 with lp_linear_2 and galaxy_linear_3's basis with [lp_linear_3, lp_linear_4], but asserted lp_linear_3 and lp_linear_4 at positions that should be lp_linear_2 and lp_linear_3. The bug was hidden because GeometryProfile.__eq__ compared __dict__ structurally and parameter-less LightProfileLinear() instances were all equal to each other. Exposed by the LightProfileLinear pytree_token-based __eq__ in PyAutoGalaxy which makes each instance uniquely equal only to itself. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent da0ab64 commit 33b780a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test_autolens/lens/test_to_inversion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ def test__lp_linear_func_galaxy_dict_from(masked_imaging_7x7):
109109

110110
assert lp_linear_func_list[0].light_profile_list[0] == lp_linear_0
111111
assert lp_linear_func_list[0].light_profile_list[1] == lp_linear_1
112-
assert lp_linear_func_list[1].light_profile_list[0] == lp_linear_3
113-
assert lp_linear_func_list[2].light_profile_list[0] == lp_linear_4
112+
assert lp_linear_func_list[1].light_profile_list[0] == lp_linear_2
113+
assert lp_linear_func_list[2].light_profile_list[0] == lp_linear_3
114114

115115

116116
def test__cls_pg_list_from(masked_imaging_7x7, grid_2d_7x7):

0 commit comments

Comments
 (0)