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-12200 Skip photometryModel tests if testdata_jointcal is not available #53

Merged
merged 1 commit into from
Oct 11, 2017
Merged
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
11 changes: 9 additions & 2 deletions tests/test_photometryModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import lsst.afw.geom
import lsst.afw.table
import lsst.afw.image
import lsst.afw.image.utils
import lsst.daf.persistence
import lsst.jointcal.ccdImage
import lsst.jointcal.photometryModels
Expand All @@ -17,14 +18,20 @@


class PhotometryModelTestBase():
@classmethod
def setUpClass(cls):
try:
cls.data_dir = lsst.utils.getPackageDir('testdata_jointcal')
except lsst.pex.exceptions.NotFoundError:
raise unittest.SkipTest("testdata_jointcal not setup")

def setUp(self):
# Ensure that the filter list is reset for each test so that we avoid
# confusion or contamination each time we create a cfht camera below.
lsst.afw.image.utils.resetFilters()

# Load or fake the necessary metadata for each CcdImage (using ccd=12)
data_dir = lsst.utils.getPackageDir('testdata_jointcal')
input_dir = os.path.join(data_dir, 'cfht_minimal')
input_dir = os.path.join(self.data_dir, 'cfht_minimal')
visits = [849375, 850587]
ccdId = 12
self.butler = lsst.daf.persistence.Butler(input_dir)
Expand Down