示例#1
0
 def test_square_of_sum_out_of_range(self):
     record = NumberRecord(number=0)
     self.assertIsNone(record.square_of_sum())
示例#2
0
 def test_square_of_sum_bigger(self):
     record = NumberRecord(number=10)
     self.assertEqual(
         record.square_of_sum(),
         3025
         )
示例#3
0
 def test_square_of_sum_huge(self):
     record = NumberRecord(number=101)
     self.assertEqual(
         record.square_of_sum(),
         26532801
         )
示例#4
0
 def test_square_of_sum_small(self):
     record = NumberRecord(number=3)
     self.assertEqual(
         record.square_of_sum(),
         36
         )