Beispiel #1
0
 def test_map(self, input, output):
     ret = [util.conv_float(el) for el in input]
     assert ret == output
Beispiel #2
0
 def test_str(self):
     assert_equal(util.conv_float('a.b'), 'a.b')
Beispiel #3
0
 def test_float(self, s, output):
     assert util.conv_float(s) == output
Beispiel #4
0
 def test_float_2(self):
     assert_equal(util.conv_float('.45'), 0.45)
Beispiel #5
0
 def test_str(self):
     assert_equal(util.conv_float('a.b'), 'a.b')
Beispiel #6
0
 def test_float_2(self):
     assert_equal(util.conv_float('.45'), 0.45)
Beispiel #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', '!!'])
Beispiel #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])