Exemple #1
0
 def test_parse_int_list(self):
   eq_(parse_arg({'foo': '1,'}, 'foo', int, ','), [1])
   eq_(parse_arg({'foo': '1,2'}, 'foo', int, ','), [1,2])
Exemple #2
0
 def test_parse_int(self):
   eq_(parse_arg({'foo': '1'}, 'foo', int), 1)
   eq_(parse_arg({'foo': '1'}, 'foo', int, ','), 1)
Exemple #3
0
 def test_parse_float(self):
   eq_(parse_arg({'foo': '123.4'}, 'foo', float), 123.4)
Exemple #4
0
 def test_parse_invalid(self):
   parse_arg({'foo': 'a'}, 'foo', int)
Exemple #5
0
 def test_parse_int_list(self):
     eq_(parse_arg({'foo': '1,'}, 'foo', int, ','), [1])
     eq_(parse_arg({'foo': '1,2'}, 'foo', int, ','), [1, 2])
Exemple #6
0
 def test_parse_float(self):
     eq_(parse_arg({'foo': '123.4'}, 'foo', float), 123.4)
Exemple #7
0
 def test_parse_int(self):
     eq_(parse_arg({'foo': '1'}, 'foo', int), 1)
     eq_(parse_arg({'foo': '1'}, 'foo', int, ','), 1)
Exemple #8
0
 def test_parse_invalid(self):
     parse_arg({'foo': 'a'}, 'foo', int)