def test_parse_throws_when_number_is_invalid(self):
     with self.assertRaises(ValueError):
         function.parse_number('bogus')
 def test_parse_int(self):
     self.assertEqual(function.parse_number(42), 42)
 def test_parse_float(self):
     self.assertEqual(function.parse_number(42.0), 42.0)
 def test_parse_string(self):
     self.assertEqual(function.parse_number('42'), 42)