Addressed a few minor issues raised by Juan and Stefan.

This commit is contained in:
emmanuelle
2015-05-09 10:23:49 +02:00
parent a615623643
commit 1c3af75dd3
2 changed files with 17 additions and 8 deletions
+6
View File
@@ -1,3 +1,4 @@
import numpy as np
import skimage.data as data
from numpy.testing import assert_equal
@@ -7,6 +8,7 @@ def test_lena():
lena = data.lena()
assert_equal(lena.shape, (512, 512, 3))
def test_astronaut():
""" Test that "astronaut" image can be loaded. """
astronaut = data.astronaut()
@@ -61,6 +63,10 @@ def test_binary_blobs():
assert blobs.mean() == 0.25
blobs = data.binary_blobs(length=32, volume_fraction=0.25, n_dim=3)
assert blobs.mean() == 0.25
other_realization = data.binary_blobs(length=32, volume_fraction=0.25,
n_dim=3)
assert not np.all(blobs == other_realization)
if __name__ == "__main__":
from numpy.testing import run_module_suite