mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-26 13:37:17 +08:00
formatting, used assert_equals in test
This commit is contained in:
@@ -336,8 +336,8 @@ class _RegionProperties(MutableMapping):
|
||||
for key in PROP_VALS:
|
||||
try:
|
||||
#so that NaNs are equal
|
||||
np.testing.assert_equal(
|
||||
getattr(self, key, None), getattr(other, key, None))
|
||||
np.testing.assert_equal(getattr(self, key, None),
|
||||
getattr(other, key, None))
|
||||
except AssertionError:
|
||||
return False
|
||||
|
||||
|
||||
@@ -383,8 +383,8 @@ def test_equals():
|
||||
r2 = regions[0]
|
||||
r3 = regions[1]
|
||||
|
||||
assert r1 == r2
|
||||
assert r1 != r3
|
||||
assert_equal(r1 == r2, True, "Same regionprops are not equal")
|
||||
assert_equal(r1 != r3, True, "Different regionprops are equal")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user