Make test more robust.

Test shouldn't depend on the order of the detected corners.
This commit is contained in:
Tony S Yu
2012-02-02 22:33:57 -05:00
parent 83dc4a1d40
commit 4831185b4c
+2 -1
View File
@@ -38,7 +38,8 @@ def test_rotated_lena():
results = harris(im)
im_rotated = im.T
results_rotated = harris(im_rotated)
assert (results[:, 0] == results_rotated[:, 1]).all()
assert (np.sort(results[:, 0]) == np.sort(results_rotated[:, 1])).all()
assert (np.sort(results[:, 1]) == np.sort(results_rotated[:, 0])).all()
if __name__ == '__main__':