Example #1
0
 def test_no_long(self):
     opt1 = CmdOption({
         'name': 'op1',
         'default': '',
         'type': str,
         'short': 's'
     })
     assert '-s ARG' == opt1.help_param()
Example #2
0
 def test_non_bool_param(self):
     opt1 = CmdOption({
         'name': 'op1',
         'default': '',
         'type': str,
         'short': 's',
         'long': 'susu'
     })
     assert '-s ARG, --susu=ARG' == opt1.help_param()
Example #3
0
 def test_bool_param(self):
     opt1 = CmdOption({
         'name': 'op1',
         'default': '',
         'type': bool,
         'short': 'b',
         'long': 'bobo'
     })
     assert '-b, --bobo' == opt1.help_param()
Example #4
0
 def test_no_long(self):
     opt1 = CmdOption({'name':'op1', 'default':'', 'type':str,
                       'short':'s'})
     assert '-s ARG' == opt1.help_param()
Example #5
0
 def test_non_bool_param(self):
     opt1 = CmdOption({'name':'op1', 'default':'', 'type':str,
                       'short':'s', 'long': 'susu'})
     assert '-s ARG, --susu=ARG' == opt1.help_param()
Example #6
0
 def test_bool_param(self):
     opt1 = CmdOption({'name':'op1', 'default':'', 'type':bool,
                       'short':'b', 'long': 'bobo'})
     assert '-b, --bobo' == opt1.help_param()