Skip to content

Commit

Permalink
Improve assertTransformsEqual
Browse files Browse the repository at this point in the history
Make `assertTransformsEqual` produce a clearer failure
if two transforms have a corresponding endpoint that is generic
and has a different number of axes.
  • Loading branch information
r-owen committed Oct 11, 2017
1 parent 30a41ee commit 7385f6d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/lsst/afw/geom/testUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,8 @@ def checkThen(self, fromName, midName, toName):
def assertTransformsEqual(self, transform1, transform2):
"""Assert that two transforms are equal"""
self.assertEqual(type(transform1), type(transform2))
self.assertEqual(transform1.fromEndpoint, transform2.fromEndpoint)
self.assertEqual(transform1.toEndpoint, transform2.toEndpoint)
self.assertEqual(transform1.getFrameSet(), transform2.getFrameSet())

fromEndpoint = transform1.fromEndpoint
Expand Down

0 comments on commit 7385f6d

Please sign in to comment.