示例#1
0
 def test_empty(self):
     self.assertEqual(sum_of_digits(''), 0)
示例#2
0
 def test_double_digits(self):
     self.assertEqual(sum_of_digits('82'), 10)
示例#3
0
 def test_triple_digits(self):
     self.assertEqual(sum_of_digits('123'), 6)
 def test_10(self):
     self.assertEqual(sum_of_digits('1234'), 10)
示例#5
0
 def test_single_digit(self):
     self.assertEqual(sum_of_digits('9'), 9)
 def test_4(self):
     self.assertEqual(sum_of_digits('1111'), 4)
 def test_0(self):
     self.assertEqual(sum_of_digits(''), 0)
 def test_single_digit(self):
     self.assertEqual(sum_of_digits('9'), 9)
 def test_11(self):
     self.assertEqual(sum_of_digits('434'), 11)
 def test_triple_digits(self):
     self.assertEqual(sum_of_digits('123'), 6)
 def test_double_digits(self):
     self.assertEqual(sum_of_digits('82'), 10)
示例#12
0
 def test_10(self):
     self.assertEqual(sum_of_digits('1234'), 10)
示例#13
0
 def test_4(self):
     self.assertEqual(sum_of_digits('1111'), 4)
示例#14
0
 def test_11(self):
     self.assertEqual(sum_of_digits('434'), 11)