Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-24923: eliminate redundant class name & name requirement in butler command test cases #212

Merged
merged 2 commits into from
May 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
56 changes: 7 additions & 49 deletions tests/test_butlerCmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,73 +29,31 @@


class TestButlerCmdLsstComCam(ButlerCmdTestBase, lsst.utils.tests.TestCase):
@staticmethod
def instrumentClass():
return "lsst.obs.lsst.LsstComCam"

@staticmethod
def instrumentName():
return "LSSTComCam"
instrumentClassName = "lsst.obs.lsst.LsstComCam"


class TestButlerCmdLsstImSim(ButlerCmdTestBase, lsst.utils.tests.TestCase):
@staticmethod
def instrumentClass():
return "lsst.obs.lsst.LsstImSim"

@staticmethod
def instrumentName():
return "LSST-ImSim"
instrumentClassName = "lsst.obs.lsst.LsstImSim"


class TestButlerCmdLsstPhoSim(ButlerCmdTestBase, lsst.utils.tests.TestCase):
@staticmethod
def instrumentClass():
return "lsst.obs.lsst.LsstPhoSim"

@staticmethod
def instrumentName():
return "LSST-PhoSim"
instrumentClassName = "lsst.obs.lsst.LsstPhoSim"


class TestButlerCmdLsstTS8(ButlerCmdTestBase, lsst.utils.tests.TestCase):
@staticmethod
def instrumentClass():
return "lsst.obs.lsst.LsstTS8"

@staticmethod
def instrumentName():
return "LSST-TS8"
instrumentClassName = "lsst.obs.lsst.LsstTS8"


class TestButlerCmdLsstUCDCam(ButlerCmdTestBase, lsst.utils.tests.TestCase):
@staticmethod
def instrumentClass():
return "lsst.obs.lsst.LsstUCDCam"

@staticmethod
def instrumentName():
return "LSST-UCDCam"
instrumentClassName = "lsst.obs.lsst.LsstUCDCam"


class TestButlerCmdLsstTS3(ButlerCmdTestBase, lsst.utils.tests.TestCase):
@staticmethod
def instrumentClass():
return "lsst.obs.lsst.LsstTS3"

@staticmethod
def instrumentName():
return "LSST-TS3"
instrumentClassName = "lsst.obs.lsst.LsstTS3"


class TestButlerCmdLatiss(ButlerCmdTestBase, lsst.utils.tests.TestCase):
@staticmethod
def instrumentClass():
return "lsst.obs.lsst.Latiss"

@staticmethod
def instrumentName():
return "LATISS"
instrumentClassName = "lsst.obs.lsst.Latiss"


def setup_module(module):
Expand Down
30 changes: 10 additions & 20 deletions tests/test_ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,21 @@


class LatissIngestTestCase(IngestTestBase, lsst.utils.tests.TestCase):
curatedCalibrationDatasetTypes = ("camera", "defects")

def setUp(self):
self.ingestDir = TESTDIR
self.instrument = "lsst.obs.lsst.Latiss"
self.instrumentName = "LATISS"
self.file = os.path.join(DATAROOT, "latiss", "raw", "2018-09-20",
"3018092000065-det000.fits")
self.dataIds = [dict(instrument="LATISS", exposure=3018092000065, detector=0)]

super().setUp()
curatedCalibrationDatasetTypes = ("camera", "defects")
instrumentClassName = "lsst.obs.lsst.Latiss"
ingestDir = TESTDIR
file = os.path.join(DATAROOT, "latiss", "raw", "2018-09-20", "3018092000065-det000.fits")
dataIds = [dict(instrument="LATISS", exposure=3018092000065, detector=0)]


class Ts3IngestTestCase(IngestTestBase, lsst.utils.tests.TestCase):
curatedCalibrationDatasetTypes = ("camera",)

def setUp(self):
self.ingestDir = TESTDIR
self.instrument = "lsst.obs.lsst.LsstTS3"
self.instrumentName = "LSST-TS3"
self.file = os.path.join(DATAROOT, "ts3", "raw", "2018-11-15",
"201811151255111-R433-S00-det433.fits")
self.dataIds = [dict(instrument="LSST-TS3", exposure=201811151255111, detector=433)]

super().setUp()
curatedCalibrationDatasetTypes = ("camera",)
instrumentClassName = "lsst.obs.lsst.LsstTS3"
ingestDir = TESTDIR
file = os.path.join(DATAROOT, "ts3", "raw", "2018-11-15", "201811151255111-R433-S00-det433.fits")
dataIds = [dict(instrument="LSST-TS3", exposure=201811151255111, detector=433)]


def setup_module(module):
Expand Down