Coverage for tests/test_instrument.py: 63%

17 statements  

« prev     ^ index     » next       coverage.py v7.5.1, created at 2024-05-07 03:58 -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.subaru 

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

30 

31 

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

33 def setUp(self): 

34 physical_filters = {"HSC-G", 

35 "HSC-R", 

36 "HSC-R2", 

37 "HSC-I", 

38 "HSC-I2", 

39 "HSC-Z", 

40 "HSC-Y", 

41 "ENG-R1", 

42 "NB0387", 

43 "NB0400", 

44 "NB0468", 

45 "NB0515", 

46 "NB0527", 

47 "NB0656", 

48 "NB0718", 

49 "NB0816", 

50 "NB0921", 

51 "NB0926", 

52 "IB0945", 

53 "NB0973", 

54 "NB1010", 

55 "SH", 

56 "PH", 

57 "empty"} 

58 self.data = InstrumentTestData(name="HSC", 

59 nDetectors=112, 

60 firstDetectorName="1_53", 

61 physical_filters=physical_filters) 

62 

63 self.instrument = lsst.obs.subaru.HyperSuprimeCam() 

64 

65 

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

67 pass 

68 

69 

70def setup_module(module): 

71 lsst.utils.tests.init() 

72 

73 

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

75 lsst.utils.tests.init() 

76 unittest.main()