Coverage for tests/test_instrument.py: 70%

17 statements  

« prev     ^ index     » next       coverage.py v6.4.2, created at 2022-08-06 02:12 -0700

1# This file is part of daf_butler. 

2# 

3# Developed for the LSST Data Management System. 

4# This product includes software developed by the LSST Project 

5# (http://www.lsst.org). 

6# See the COPYRIGHT file at the top-level directory of this distribution 

7# for details of code ownership. 

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 GNU General Public License 

20# along with this program. If not, see <http://www.gnu.org/licenses/>. 

21 

22"""Tests of the HyperSuprimeCam instrument class. 

23""" 

24 

25import unittest 

26 

27import lsst.utils.tests 

28import lsst.obs.cfht 

29from lsst.obs.base.instrument_tests import InstrumentTests, InstrumentTestData 

30 

31 

32class TestMegaCam(InstrumentTests, lsst.utils.tests.TestCase): 

33 def setUp(self): 

34 physical_filters = { 

35 "u.MP9301", 

36 "u.MP9302", 

37 "u.MP9303", 

38 "g.MP9401", 

39 "g.MP9402", 

40 "g.MP9501", 

41 "g.MP9502", 

42 "r.MP9601", 

43 "r.MP9602", 

44 "r.MP9603", 

45 "r.MP9604", 

46 "r.MP9605", 

47 "i.MP9701", 

48 "i.MP9702", 

49 "i.MP9703", 

50 "z.MP9801", 

51 "z.MP9901", 

52 } 

53 self.data = InstrumentTestData(name="MegaPrime", 

54 nDetectors=36, 

55 firstDetectorName="ccd00", 

56 physical_filters=physical_filters) 

57 

58 self.instrument = lsst.obs.cfht.MegaPrime() 

59 

60 

61class MemoryTester(lsst.utils.tests.MemoryTestCase): 

62 pass 

63 

64 

65def setup_module(module): 

66 lsst.utils.tests.init() 

67 

68 

69if __name__ == '__main__': 69 ↛ 70line 69 didn't jump to line 70, because the condition on line 69 was never true

70 lsst.utils.tests.init() 

71 unittest.main()