Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-9081

testExposure.testGetWcs docstring is wrong, and tests should be assertIsNone

    Details

      Description

      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.

        Attachments

          Container Issues

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Parejkoj John Parejko
                Watchers:
                John Parejko, Krzysztof Findeisen, Pim Schellart [X] (Inactive), Russell Owen, Simon Krughoff
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Summary Panel