mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-02 13:03:48 +08:00
Add missing unittests for data and convert horse to binary
This commit is contained in:
@@ -7,11 +7,13 @@ For more images, see
|
||||
"""
|
||||
|
||||
import os as _os
|
||||
import warnings
|
||||
|
||||
from .. import data_dir
|
||||
from ..io import imread, use_plugin
|
||||
from .._shared.utils import deprecated
|
||||
from ._binary_blobs import binary_blobs
|
||||
from .. import img_as_bool
|
||||
|
||||
__all__ = ['load',
|
||||
'camera',
|
||||
@@ -168,7 +170,9 @@ def horse():
|
||||
(marauder).
|
||||
|
||||
"""
|
||||
return load("horse.png")
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("ignore")
|
||||
return img_as_bool(load("horse.png"))
|
||||
|
||||
|
||||
def clock():
|
||||
|
||||
@@ -25,9 +25,35 @@ def test_checkerboard():
|
||||
data.checkerboard()
|
||||
|
||||
|
||||
def test_text():
|
||||
""" Test that "text" image can be loaded. """
|
||||
data.text()
|
||||
def test_chelsea():
|
||||
""" Test that "chelsea" image can be loaded. """
|
||||
data.chelsea()
|
||||
|
||||
|
||||
def test_clock():
|
||||
""" Test that "clock" image can be loaded. """
|
||||
data.clock()
|
||||
|
||||
|
||||
def test_coffee():
|
||||
""" Test that "coffee" image can be loaded. """
|
||||
data.coffee()
|
||||
|
||||
|
||||
def test_horse():
|
||||
""" Test that "horse" image can be loaded. """
|
||||
horse = data.horse()
|
||||
assert_equal(horse.dtype, np.dtype('bool'))
|
||||
|
||||
|
||||
def test_hubble():
|
||||
""" Test that "Hubble" image can be loaded. """
|
||||
data.hubble_deep_field()
|
||||
|
||||
|
||||
def test_immunohistochemistry():
|
||||
""" Test that "immunohistochemistry" image can be loaded. """
|
||||
data.immunohistochemistry()
|
||||
|
||||
|
||||
def test_moon():
|
||||
@@ -40,19 +66,14 @@ def test_page():
|
||||
data.page()
|
||||
|
||||
|
||||
def test_clock():
|
||||
""" Test that "clock" image can be loaded. """
|
||||
data.clock()
|
||||
def test_rocket():
|
||||
""" Test that "rocket" image can be loaded. """
|
||||
data.rocket()
|
||||
|
||||
|
||||
def test_chelsea():
|
||||
""" Test that "chelsea" image can be loaded. """
|
||||
data.chelsea()
|
||||
|
||||
|
||||
def test_coffee():
|
||||
""" Test that "coffee" image can be loaded. """
|
||||
data.coffee()
|
||||
def test_text():
|
||||
""" Test that "text" image can be loaded. """
|
||||
data.text()
|
||||
|
||||
|
||||
def test_binary_blobs():
|
||||
|
||||
Reference in New Issue
Block a user