Skip to content

Commit

Permalink
replace eups calls with lsst.utils.getPackageDir()
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoblitt committed May 22, 2015
1 parent fc6a288 commit 531b355
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions python/lsst/obs/test/testMapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import os

import eups
import lsst.utils
import lsst.afw.image.utils as afwImageUtils
from lsst.daf.butlerUtils import CameraMapper
import lsst.pex.policy as pexPolicy
Expand Down Expand Up @@ -65,9 +65,7 @@ def _defectLookup(self, dataId):
@param dataId (dict) Dataset identifier
@return (string) path to the defects file or None if not available
"""
obsTestDir = eups.productDir("obs_test")
if obsTestDir is None:
raise RuntimeError("obs_test must be setup")
obsTestDir = lsst.utils.getPackageDir('obs_test')

return os.path.join(obsTestDir, "data", "input", "defects", "defects.fits")

Expand Down
6 changes: 2 additions & 4 deletions tests/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import os
import unittest

import eups
import lsst.utils
import lsst.utils.tests as utilsTests
from lsst.obs.test import TestMapper
import lsst.afw.image as afwImage
Expand All @@ -34,9 +34,7 @@ class TestMapperTestCase(unittest.TestCase):
"""A test case for the test mapper."""

def setUp(self):
obsTestDir = eups.productDir("obs_test")
if not obsTestDir:
raise RuntimeError("obs_test is not setup")
obsTestDir = lsst.utils.getPackageDir('obs_test')
self.input = os.path.join(obsTestDir, "data", "input")
self.output = self.input
self.mapper = TestMapper(root=self.input)
Expand Down

0 comments on commit 531b355

Please sign in to comment.