mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-06 05:16:40 +08:00
Increase test coverage of regionprops
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user