예제 #1
0
 def test_invalid_data(self):
     in_string = "A6"
     with self.assertRaises(InvalidDataException):
         out_string = improve_dollar_amount(in_string)
         print out_string
예제 #2
0
 def test_remove_chars(self):
     in_string = "$1,234.56"
     out_string = improve_dollar_amount(in_string)
     self.assertEqual("1234.56", out_string)
예제 #3
0
 def test_add_cents(self):
     in_string = "123"
     out_string = improve_dollar_amount(in_string)
     self.assertEqual("123.00", out_string)
예제 #4
0
 def test_no_op(self):
     in_string = "1234.56"
     out_string = improve_dollar_amount(in_string)
     self.assertEqual(in_string, out_string)