Coverage for tests/test_camera.py: 48%
25 statements
« prev ^ index » next coverage.py v6.5.0, created at 2023-04-07 02:25 -0700
« prev ^ index » next coverage.py v6.5.0, created at 2023-04-07 02:25 -0700
1#
2# LSST Data Management System
3#
4# Copyright 2008-2016 AURA/LSST.
5#
6# This product includes software developed by the
7# LSST Project (http://www.lsst.org/).
8#
9# This program is free software: you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation, either version 3 of the License, or
12# (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the LSST License Statement and
20# the GNU General Public License along with this program. If not,
21# see <https://www.lsstcorp.org/LegalNotices/>.
22#
23import unittest
25import lsst.utils.tests
26from lsst.obs.subaru import HyperSuprimeCam
29class CameraTestCase(lsst.utils.tests.TestCase):
31 def setUp(self):
32 hsc = HyperSuprimeCam()
33 self.camera = hsc.getCamera()
35 def tearDown(self):
36 del self.camera
38 def testName(self):
39 self.assertEqual(self.camera.getName(), "HSC")
41 def testNumCcds(self):
42 self.assertEqual(len(list(self.camera.getIdIter())), 112)
44 def testCcdSize(self):
45 for ccd in self.camera:
46 self.assertEqual(ccd.getBBox().getWidth(), 2048)
47 self.assertEqual(ccd.getBBox().getHeight(), 4176)
50class TestMemory(lsst.utils.tests.MemoryTestCase):
51 def setUp(self):
52 lsst.utils.tests.MemoryTestCase.setUp(self)
55def setup_module(module):
56 lsst.utils.tests.init()
59if __name__ == "__main__": 59 ↛ 60line 59 didn't jump to line 60, because the condition on line 59 was never true
60 lsst.utils.tests.init()
61 unittest.main()