The docstring for testExposure.testGetWcs does not match the implemented tests in the method, and at least some of those tests appear to be incorrect, given the current (SWIGed) behavior of lsst.afw.image.Wcs. I've listed several obvious problems below:
- The docstring claims exceptions should be raised, but none of the tests check for exceptions.
- In addition, exposure.getWcs() returns None if the exposure was initialized without a Wcs, not False. None is "falsey", but if the API really wants None returned, we should test for that explicitly.
- The two unadorned getWcs() calls should have an assertEqual against self.wcs, since that's what those exposures were initialized with.
- I also noticed testSetMembers, which catches a pex.Exception, prints a message, and then continues on its merry way. This should also be fixed.
This whole test suite needs to be looked at. That might be beyond scope for this ticket, but all of the above points are very worrying.