Skip to content

Commit 6a3edcd

Browse files
make python test less senstivity to rounding error
1 parent a17e79f commit 6a3edcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/swig/test/python/test_buildblock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def test_zoom_image():
177177
new_size=6
178178
zoomed_image=zoom_image(image, zoom, offset, offset, new_size)
179179
ind=zoomed_image.get_indices_closest_to_physical_coordinates(middle_in_mm)
180-
assert zoomed_image[ind]==1./(zoom*zoom)
180+
assert abs(zoomed_image[ind]-1./(zoom*zoom))<.001
181181
# awkward syntax...
182182
zoomed_image=zoom_image(image, zoom, offset, offset, new_size, ZoomOptions(ZoomOptions.preserve_sum))
183183
assert abs(zoomed_image[ind]-1./(zoom*zoom))<.001

0 commit comments

Comments
 (0)