Exemplo n.º 1
0
 def test_ignore_invalid_chars_behind_float(self, s):
     assert _search_float(s) == 1.0
Exemplo n.º 2
0
 def test_if_works_bytes(self, b):
     assert _search_float(b) == 1.0
Exemplo n.º 3
0
 def test_ignore_whitespace_in_front_of_float(self, s):
     assert _search_float(s) == 1.0
Exemplo n.º 4
0
 def test_ignore_whitespace_behind_float(self, s):
     assert _search_float(s) == 1.0
Exemplo n.º 5
0
 def test_negative_exponent(self):
     assert _search_float("1e-1") == 0.1
     assert _search_float("-1e-1") == -0.1
Exemplo n.º 6
0
 def test_valid_negative_floats(self, s):
     assert _search_float(s) == -1.0
Exemplo n.º 7
0
 def test_valid_positive_floats(self, s):
     assert _search_float(s) == 1.0
Exemplo n.º 8
0
 def test_valid_zero(self, s):
     assert _search_float(s) == 0.0
Exemplo n.º 9
0
 def test_negative_exponent(self):
     assert _search_float('1e-1') == 0.1
     assert _search_float('-1e-1') == -0.1