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

Skip obs_cfht butler mapper test if datadir isn't found.

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: obs_cfht
    • Labels:
      None
    • Team:
      SQuaRE

      Description

      All of the test* functions in tests/testButler.py were disabled if the datadir wasn't found except for testPackageName. However, that test uses the butler as well, so if there's no datadir then that test must be skipped as well. Fix is to do:

          def testPackageName(self):
              if not self.runTests:
                  return
              self.assertEqual(self.butler.mapper.packageName, "obs_cfht")
      

        Attachments

          Activity

          wmwood-vasey Michael Wood-Vasey created issue -
          wmwood-vasey Michael Wood-Vasey made changes -
          Field Original Value New Value
          Assignee Michael Wood-Vasey [ wmwood-vasey ]
          Status To Do [ 10001 ] In Progress [ 3 ]
          wmwood-vasey Michael Wood-Vasey made changes -
          Description All of the `test*` functions in `tests/testButler.py` were disabled if the datadir wasn't found except for `testPackageName`. However, that test uses the butler as well, so if there's no datadir then that test must be skipped as well. Fix is to do:

          ```
              def testPackageName(self):
                  if not self.runTests:
                      return
                  self.assertEqual(self.butler.mapper.packageName, "obs_cfht")
          ```
          All of the {{test*}} functions in {{tests/testButler.py}} were disabled if the {{datadir}} wasn't found except for {{testPackageName}}. However, that test uses the butler as well, so if there's no {{datadir}} then that test must be skipped as well. Fix is to do:

          {code}
              def testPackageName(self):
                  if not self.runTests:
                      return
                  self.assertEqual(self.butler.mapper.packageName, "obs_cfht")
          {code}
          wmwood-vasey Michael Wood-Vasey made changes -
          Summary Disable obs_cfht butler mapper test if datadir wasn't found. Skip obs_cfht butler mapper test if datadir wasn't found.
          wmwood-vasey Michael Wood-Vasey made changes -
          Summary Skip obs_cfht butler mapper test if datadir wasn't found. Skip obs_cfht butler mapper test if datadir isn't found.
          wmwood-vasey Michael Wood-Vasey made changes -
          Reviewers Tim Jenness [ tjenness ]
          Status In Progress [ 3 ] In Review [ 10004 ]
          tjenness Tim Jenness made changes -
          Status In Review [ 10004 ] Reviewed [ 10101 ]
          wmwood-vasey Michael Wood-Vasey made changes -
          Resolution Done [ 10000 ]
          Status Reviewed [ 10101 ] Done [ 10002 ]
          jbecla Jacek Becla made changes -
          Team SQuaRE [ 10302 ]

            People

            • Assignee:
              wmwood-vasey Michael Wood-Vasey
              Reporter:
              wmwood-vasey Michael Wood-Vasey
              Reviewers:
              Tim Jenness
              Watchers:
              Hsin-Fang Chiang, Michael Wood-Vasey, Tim Jenness
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel

                  Time Tracking

                  Estimated:
                  Original Estimate - 15 minutes
                  15m
                  Remaining:
                  Remaining Estimate - 15 minutes
                  15m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified