Skip to content

Commit f942c6a

Browse files
committed
Relaxed over-constrained test (uncovered by issue #53).
1 parent 96cdb90 commit f942c6a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spectral/tests/spatial.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ def test_map_class_ids_src_gt_dest(self):
170170
gt2[i, j] = new_label
171171

172172
d = map_class_ids(gt2, gt)
173-
assert(d[new_label] == new_label)
173+
# There are enough pixels for each class that a new single-pixel class
174+
# should not be mapped to one of the existing classes.
175+
assert(d[new_label] not in gt)
174176
d.pop(new_label)
175177
for (i, j) in d.items():
176178
assert(j == i)

0 commit comments

Comments
 (0)