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

Clean up ip_diffim tests

    XMLWordPrintable

    Details

    • Type: Story
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: ip_diffim
    • Labels:
      None

      Description

      During review of DM-7297 (porting ip_diffim to py3), we found the examples and tests needed more attention. Some specifics to start:

      • There are three test files in the examples and it's unclear why (`compareKernelTypes`, `compareLambdaTypes`, and `jackknifeResampleSpatialKernel`)
      • The `compareLambdaTypes` example uses `afwdata` but should catch the exception if `afwdata` is missing and then skip the tests. It also has old-style tests with `suite.`
      • There are lots of try/except/else blocks in `testBasisLists` (and other tests too!) that would be cleaner using a `with self.assertRaises(Exception)` syntax. tjenness says: "I think this entire construct exists to convert an 'E' test error into an 'F' test failure ... I would be inclined to remove all the boilerplate and let any problems trigger an 'E' because these commands are all meant to work and an 'E' is still something that needs to be fixed. There's a reason why there is no `self.assertDoesNotRaise()` method in `unittest`."

        Attachments

          Issue Links

            Activity

            Hide
            Parejkoj John Parejko added a comment -

            I've pushed a possible fix for item 3 (for just testBasisLists) to DM-7297.

            Show
            Parejkoj John Parejko added a comment - I've pushed a possible fix for item 3 (for just testBasisLists) to DM-7297 .

              People

              Assignee:
              gkovacs Gabor Kovacs [X] (Inactive)
              Reporter:
              mrawls Meredith Rawls
              Watchers:
              John Parejko, Meredith Rawls, Simon Krughoff, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:

                  Jenkins

                  No builds found.