Increase test coverage of regionprops

This commit is contained in:
Johannes Schönberger
2013-11-22 12:16:44 +01:00
parent 2e8a36a283
commit 6e6505ecb6
+10
View File
@@ -345,6 +345,9 @@ def test_old_dict_interface():
np.array([list(props.values()) for props in feats], np.float)
assert_equal(len(feats[0]), 8)
def assign():
feats[0]['Area'] = 0
assert_raises(RuntimeError, assign)
def test_label_sequence():
@@ -361,6 +364,13 @@ def test_pure_background():
assert len(ps) == 0
def test_invalid():
ps = regionprops(SAMPLE)
def get_intensity_image():
ps[0].intensity_image
assert_raises(AttributeError, get_intensity_image)
if __name__ == "__main__":
from numpy.testing import run_module_suite
run_module_suite()