Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1# This file is part of ctrl_mpexec. 

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 

23import click 

24import unittest 

25 

26from lsst.ctrl.mpexec.cli.opt import (delete_option, 

27 order_pipeline_option, 

28 pipeline_dot_option, 

29 pipeline_option, 

30 save_pipeline_option, 

31 show_option, 

32 task_option) 

33from lsst.daf.butler.tests import (OptFlagTest, 

34 OptHelpTest, 

35 OptMultipleTest, 

36 OptPathTypeTest, 

37 OptRequiredTest) 

38 

39 

40class DeleteTestCase(OptHelpTest, 

41 OptMultipleTest, 

42 OptRequiredTest, 

43 unittest.TestCase): 

44 metavar = "LABEL" 

45 optionName = "delete" 

46 optionClass = delete_option 

47 

48 

49class OrderPipelineTestCase(OptFlagTest, 

50 OptHelpTest, 

51 unittest.TestCase): 

52 optionName = "order-pipeline" 

53 optionClass = order_pipeline_option 

54 

55 

56class PipelineTestCase(OptHelpTest, 

57 OptRequiredTest, 

58 unittest.TestCase): 

59 shortOptionName = "p" 

60 optionName = "pipeline" 

61 optionClass = pipeline_option 

62 valueType = click.Path(exists=True, writable=False, dir_okay=False, file_okay=True) 

63 

64 

65class PipelineDotTestCase(OptHelpTest, 

66 OptPathTypeTest, 

67 OptRequiredTest, 

68 unittest.TestCase): 

69 optionName = "pipeline-dot" 

70 optionClass = pipeline_dot_option 

71 valueType = click.Path(exists=True, writable=True, file_okay=True, dir_okay=False) 

72 

73 

74class SavePipelineTestCase(OptHelpTest, 

75 OptRequiredTest, 

76 unittest.TestCase): 

77 metavar = "FILE" 

78 shortOptionName = "s" 

79 optionName = "save-pipeline" 

80 optionClass = save_pipeline_option 

81 valueType = click.Path(writable=True, dir_okay=True, file_okay=False) 

82 

83 

84class ShowTestCase(OptHelpTest, 

85 OptMultipleTest, 

86 OptRequiredTest, 

87 unittest.TestCase): 

88 metavar = show_option.defaultMetavar 

89 optionName = "show" 

90 optionClass = show_option 

91 

92 

93class TaskTestCase(OptHelpTest, 

94 OptMultipleTest, 

95 OptRequiredTest, 

96 unittest.TestCase): 

97 metavar = task_option.defaultMetavar 

98 shortOptionName = "t" 

99 optionName = "task" 

100 optionClass = task_option 

101 

102 

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

104 unittest.main()