def test_str_to_float_zero(self): self.assertEqual(str_to_float('0'), 0.0)
def test_str_to_float_messy(self): self.assertEqual(str_to_float('bb-23.34***'), -23.34)
def test_str_to_float_unparsable_input(self): self.assertIsNone(str_to_float('-a'))
def test_str_to_float_simple(self): self.assertEqual(str_to_float('-23.34'), -23.34)