Exemple #1
0
 def test_map(self, input, output):
     ret = [util.conv_float(el) for el in input]
     assert ret == output
 def test_str(self):
     assert_equal(util.conv_float('a.b'), 'a.b')
Exemple #3
0
 def test_float(self, s, output):
     assert util.conv_float(s) == output
 def test_float_2(self):
     assert_equal(util.conv_float('.45'), 0.45)
Exemple #5
0
 def test_str(self):
     assert_equal(util.conv_float('a.b'), 'a.b')
Exemple #6
0
 def test_float_2(self):
     assert_equal(util.conv_float('.45'), 0.45)
Exemple #7
0
 def test_map_2(self):
     ret = [util.conv_float(el) for el in ('0.45', 'a.b', '!!')]
     assert_equal(ret, [0.45, 'a.b', '!!'])
Exemple #8
0
 def test_map_1(self):
     ret = [util.conv_float(el) for el in ('0.45', '0.56', '6.7')]
     assert_equal(ret, [0.45, 0.56, 6.7])