From 06a9c5da8a3206316b1b8e6941a6bac784e16a1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Fri, 22 Nov 2013 11:34:32 +0100 Subject: [PATCH] Add test case for union of heterogenous tform types --- skimage/transform/tests/test_geometric.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/skimage/transform/tests/test_geometric.py b/skimage/transform/tests/test_geometric.py index c7f9f832..aa968380 100644 --- a/skimage/transform/tests/test_geometric.py +++ b/skimage/transform/tests/test_geometric.py @@ -169,11 +169,16 @@ def test_union(): tform1 = SimilarityTransform(scale=0.1, rotation=0.3) tform2 = SimilarityTransform(scale=0.1, rotation=0.9) tform3 = SimilarityTransform(scale=0.1 ** 2, rotation=0.3 + 0.9) - tform = tform1 + tform2 - assert_array_almost_equal(tform._matrix, tform3._matrix) + tform1 = AffineTransform(scale=(0.1, 0.1), rotation=0.3) + tform2 = SimilarityTransform(scale=0.1, rotation=0.9) + tform3 = SimilarityTransform(scale=0.1 ** 2, rotation=0.3 + 0.9) + tform = tform1 + tform2 + assert_array_almost_equal(tform._matrix, tform3._matrix) + assert tform.__class__ == ProjectiveTransform + if __name__ == "__main__": from numpy.testing import run_module_suite