Skip to content

Commit f77ff10

Browse files
Jammy2211claude
authored andcommitted
test(weak): compare positions by value, not identity
The previous `assert dataset.positions is grid` failed because `VectorYX2DIrregular.__init__` re-wraps any input grid via `Grid2DIrregular(values=grid)`. The intent of the test (positions are preserved by the simulator) is satisfied by value equality. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a1cc6e9 commit f77ff10

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test_autolens/weak/test_simulator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def test__simulator_shear_yx__noise_changes_values_but_preserves_shape_and_grid(
5555

5656
assert isinstance(dataset.shear_yx, ShearYX2DIrregular)
5757
assert np.asarray(dataset.shear_yx).shape == (2, 2)
58-
assert dataset.positions is grid
58+
np.testing.assert_array_equal(np.asarray(dataset.positions), np.asarray(grid))
5959
assert np.any(np.asarray(dataset.shear_yx) != np.asarray(truth))
6060
assert list(dataset.noise_map) == pytest.approx([0.3, 0.3])
6161

0 commit comments

Comments
 (0)