コード例 #1
0
 def test_assertIsTypeInt(self):    
     #Test that the data is of type float or int
     result = grade.chkgrade('a')
     self.assertIs(type(self.result), str)
コード例 #2
0
 def test_grade_int_F(self):
     """
     Test that the output of the grade is correct.
     """
     result = grade.chkgrade(59)
     self.assertEqual(result, 'F')
コード例 #3
0
 def test_grade_float_D(self):
     """
     Test that the output of the grade is correct.
     """
     result = grade.chkgrade(69.5)
     self.assertEqual(result, 'D')