23 Test aggregator for obs_* packages. 25 The intention is for each obs package to have a single test class that inherits 26 from this collector class, thus "automatically" getting all new tests. If those 27 tests require setup that isn't defined in a given obs package, that obs package 28 will be broken until updated. This is intentional, as a way to prevent obs 29 packages from falling behind out of neglect. 32 from lsst.log
import Log
34 from .
import butler_tests
35 from .
import mapper_tests
36 from .
import camera_tests
38 __all__ = [
"ObsTests"]
44 Aggregator class for all of the obs_* test classes. 46 Inherit from this class, then lsst.utils.tests.TestCase, in that order. 50 class TestObsExample(lsst.obs.base.tests.ObsTests, lsst.utils.tests.TestCase): 53 self.setUp_butler_get(...) 54 self.setUp_mapper(...) 55 self.setUp_camera(...) 60 Set up the necessary shared variables used by multiple tests. 64 butler: lsst.daf.persistence.Butler 65 A butler object, instantiated on the testdata repository for the 66 obs package being tested. 67 mapper: lsst.obs.CameraMapper 68 A CameraMapper object for your camera, instantiated on the testdata 69 repository the obs package being tested. 71 dictionary of (exposure name): (dataId of that exposure in the 72 testdata repository), with unittest.SkipTest as the value for any 73 exposures you do not have/do not want to test. It must contain a 74 valid 'raw' dataId, in addition to 'bias','flat','dark', which may 75 be set to SkipTest. For example:: 76 self.dataIds = {'raw': {'visit': 1, 'filter': 'g'}, 79 'dark': unittest.SkipTest 85 self.
log = Log.getLogger(
'ObsTests')
def setUp_tests(self, butler, mapper, dataIds)