Add missing empty lines between test functions

This commit is contained in:
Johannes Schönberger
2012-10-09 08:04:25 +02:00
parent e47411ed4c
commit dc0d4eff74
@@ -46,6 +46,7 @@ def test_bbox():
bbox = regionprops(SAMPLE_mod, ['BoundingBox'])[0]['BoundingBox']
assert_array_almost_equal(bbox, (0, 0, SAMPLE.shape[0], SAMPLE.shape[1]-1))
def test_central_moments():
mu = regionprops(SAMPLE, ['CentralMoments'])[0]['CentralMoments']
#: determined with OpenCV
@@ -58,6 +59,7 @@ def test_central_moments():
assert_almost_equal(mu[2,1], 2000.296296296291)
assert_almost_equal(mu[3,0], -760.0246913580195)
def test_centroid():
centroid = regionprops(SAMPLE, ['Centroid'])[0]['Centroid']
# determined with MATLAB
@@ -208,6 +210,7 @@ def test_moments():
assert_almost_equal(m[2,1], 43882.0)
assert_almost_equal(m[3,0], 95588.0)
def test_normalized_moments():
nu = regionprops(SAMPLE, ['NormalizedMoments'])[0]['NormalizedMoments']
#: determined with OpenCV
@@ -218,6 +221,7 @@ def test_normalized_moments():
assert_almost_equal(nu[2,1], 0.045473992910668816)
assert_almost_equal(nu[3,0], -0.017278118992041805)
def test_orientation():
orientation = regionprops(SAMPLE, ['Orientation'])[0]['Orientation']
# determined with MATLAB
@@ -239,6 +243,7 @@ def test_orientation():
)[0]['Orientation']
assert_almost_equal(orientation_diag, -math.pi / 4)
def test_perimeter():
per = regionprops(SAMPLE, ['Perimeter'])[0]['Perimeter']
assert_almost_equal(per, 59.2132034355964)
@@ -246,11 +251,13 @@ def test_perimeter():
per = perimeter(SAMPLE, neighbourhood=8)
assert_almost_equal(per, 43.1213203436)
def test_solidity():
solidity = regionprops(SAMPLE, ['Solidity'])[0]['Solidity']
# determined with MATLAB
assert_almost_equal(solidity, 0.580645161290323)
def test_weighted_central_moments():
wmu = regionprops(SAMPLE, ['WeightedCentralMoments'], INTENSITY_SAMPLE
)[0]['WeightedCentralMoments']
@@ -304,6 +311,7 @@ def test_weighted_moments():
)
assert_array_almost_equal(wm, ref)
def test_weighted_normalized_moments():
wnu = regionprops(SAMPLE, ['WeightedNormalizedMoments'], INTENSITY_SAMPLE
)[0]['WeightedNormalizedMoments']
@@ -315,6 +323,7 @@ def test_weighted_normalized_moments():
)
assert_array_almost_equal(wnu, ref)
if __name__ == "__main__":
from numpy.testing import run_module_suite
run_module_suite()