Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 1732ee71 authored by Gustavo Pinzon's avatar Gustavo Pinzon
Browse files

verbose missing tests

parent 5128c4dd
Pipeline #66865 passed with stages
in 26 minutes and 46 seconds
......@@ -693,7 +693,7 @@ class TestFunctionDVC(unittest.TestCase):
points, _ = spam.DIC.grid.makeGrid((10, 10, 10), 2)
disp = numpy.ones_like(points, dtype='<f4')*5
# all points should be coherent
LQC0 = spam.DIC.estimateLocalQuadraticCoherency(points, disp, neighbourRadius=1)
LQC0 = spam.DIC.estimateLocalQuadraticCoherency(points, disp, neighbourRadius=1, verbose = True)
LQC1 = spam.DIC.estimateLocalQuadraticCoherency(points, disp, neighbourRadius=20)
self.assertEqual(len(numpy.where(LQC1 > 0.1)[0]), 0)
......@@ -714,7 +714,8 @@ class TestFunctionDVC(unittest.TestCase):
dispModFit2corrected = spam.DIC.estimateDisplacementFromQuadraticFit(points[ LQC2 < 0.1],
dispMod[LQC2 < 0.1],
points[ LQC2 >= 0.1],
neighbourRadius=20)
neighbourRadius=20,
verbose = True)
dispModFit2 = dispMod.copy()
dispModFit2[LQC2 >= 0.1] = dispModFit2corrected
self.assertTrue(numpy.allclose(dispModFit2, disp))
......
......@@ -76,12 +76,12 @@ class testAll(unittest.TestCase):
background=0,
foreground=1)
# Check that a non-list entry of vect generate error
imEroded = morph.directionalErosion(imTest, vect, a, c)
imEroded = morph.directionalErosion(imTest, vect, a, c, verbose = True)
self.assertIs(imEroded, None)
# Perform watershed to label the grains
labIm = ws.watershed(imTest)
# Perform directional erosion
imEroded = morph.directionalErosion(imTest, [vect], a, c)
imEroded = morph.directionalErosion(imTest, [vect], a, c, verbose = True)
# Label the markers
markers = spam.label.watershed(imEroded)
# Compute COM
......@@ -158,7 +158,7 @@ class testAll(unittest.TestCase):
im[:, 7, 5] = True
# check if works as intended
rec = spam.filters.binaryGeodesicReconstruction(im, marker=[0, 0])
rec = spam.filters.binaryGeodesicReconstruction(im, marker=[0, 0], verbose = True)
self.assertEqual(rec.sum(), im.sum())
self.assertEqual(rec[-1, 5, 5], True)
self.assertEqual(rec[-1, 7, 5], True)
......
......@@ -235,7 +235,7 @@ class testAll(unittest.TestCase):
#vZmean = numpy.nanmean(v[:,:,:,0], axis=(1,2))
#zPos = numpy.unique(gridded['fieldCoords'][:,0])
#self.assertTrue(numpy.allclose(vZmean[numpy.isfinite(vZmean)], zPos[numpy.isfinite(vZmean)]*0.1, atol=0.1))
self.assertTrue(numpy.allclose(displ, gridded['displacementField'], atol=0.001))
self.assertTrue(numpy.allclose(displ, gridded['displacementField'], atol=0.001))
def test_rankPoints(self):
points, _ = spam.DIC.grid.makeGrid([1, 15, 15], 2)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment