Closed magnunor closed 2 years ago
For future reference, one of the pyxem test is flaky:
================================== FAILURES ===================================
____________________ TestGetEllipseModelRansac.test_xc_yc _____________________
self = <pyxem.tests.utils.test_ransac_ellipse_tools.TestGetEllipseModelRansac object at 0x0000022E1B885F10>
def test_xc_yc(self):
np.random.seed(7)
xf = np.random.randint(90, 100, size=(2, 3))
yf = np.random.randint(110, 120, size=(2, 3))
semi0, semi1 = np.ones((2, 3)) * 60, np.ones((2, 3)) * 60
rot = np.zeros((2, 3))
peak_array = mdtd._make_4d_peak_array_test_data(
xf, yf, semi0, semi1, rot, nt=20
)
ellipse_array0, inlier_array0 = ret.get_ellipse_model_ransac(
peak_array,
xf=95,
yf=115,
rf_lim=20,
semi_len_min=50,
semi_len_max=65,
semi_len_ratio_lim=1.2,
min_samples=15,
max_trails=20,
)
ellipse_array1, inlier_array1 = ret.get_ellipse_model_ransac(
peak_array,
xf=10,
yf=12,
rf_lim=20,
semi_len_min=50,
semi_len_max=65,
semi_len_ratio_lim=1.2,
min_samples=15,
max_trails=20,
)
for iy, ix in np.ndindex(xf.shape):
assert approx(xf[iy, ix], abs=0.0008) == ellipse_array0[iy, ix][1]
> assert approx(yf[iy, ix], abs=0.0008) == ellipse_array0[iy, ix][0]
E assert 119 � 8.0e-04 == 119.00085796853988
E comparison failed
E Obtained: 119.00085796853988
E Expected: 119 � 8.0e-04
D:\a\hyperspy-bundle\hyperspy-bundle\nd\lib\site-packages\pyxem\tests\utils\test_ransac_ellipse_tools.py:597: AssertionError
Failing jobs re-run.
In the
2022.05.02 Pre-release
, the macos bundle seems to be missing from the assets.https://github.com/hyperspy/hyperspy-bundle/releases/tag/2022.05.02