Skip to content

Commit

Permalink
Merge pull request #4099 from hmaarrfk/fixup_regionprops_test
Browse files Browse the repository at this point in the history
Fixup region props test
  • Loading branch information
Alexandre de Siqueira committed Aug 18, 2019
2 parents 8440646 + 1900b7e commit f9b91a1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions skimage/measure/tests/test_regionprops.py
Expand Up @@ -451,7 +451,8 @@ def test_iterate_all_props():


def test_cache():
region = regionprops(SAMPLE)[0]
SAMPLE_mod = SAMPLE.copy()
region = regionprops(SAMPLE_mod)[0]
f0 = region.filled_image
region._label_image[:10] = 1
f1 = region.filled_image
Expand Down Expand Up @@ -498,7 +499,7 @@ def test_props_to_dict():
regions = regionprops(SAMPLE)
out = _props_to_dict(regions, properties=('label', 'area', 'bbox'),
separator='+')
assert out == {'label': array([1]), 'area': array([180]),
assert out == {'label': array([1]), 'area': array([72]),
'bbox+0': array([0]), 'bbox+1': array([0]),
'bbox+2': array([10]), 'bbox+3': array([18])}

Expand All @@ -511,7 +512,7 @@ def test_regionprops_table():

out = regionprops_table(SAMPLE, properties=('label', 'area', 'bbox'),
separator='+')
assert out == {'label': array([1]), 'area': array([180]),
assert out == {'label': array([1]), 'area': array([72]),
'bbox+0': array([0]), 'bbox+1': array([0]),
'bbox+2': array([10]), 'bbox+3': array([18])}

Expand All @@ -523,4 +524,4 @@ def test_props_dict_complete():


def test_column_dtypes_complete():
assert set(COL_DTYPES.keys()).union(OBJECT_COLUMNS) == set(PROPS.values())
assert set(COL_DTYPES.keys()).union(OBJECT_COLUMNS) == set(PROPS.values())

0 comments on commit f9b91a1

Please sign in to comment.