class GradeTests(unittest.TestCase):
    def setUp(self):
        self.g = Grade("A")

    def test_get_grade(self):
        self.assertEqual(5, self.g.get_grade())

    def test_get_grade_with_sign(self):
        grade = Grade("B+")
        self.assertEqual(4.3, grade.get_grade())
예제 #2
0
class GradeTests(unittest.TestCase):
    def setUp(self):
        self.g = Grade("A")

    def test_get_grade(self):
        self.assertEqual(5, self.g.get_grade())

    def test_get_grade_with_sign(self):
        grade = Grade("B+")
        self.assertEqual(4.3, grade.get_grade())
 def test_get_grade_with_sign(self):
     grade = Grade("B+")
     self.assertEqual(4.3, grade.get_grade())
 def setUp(self):
     self.g = Grade("A")
예제 #5
0
 def test_get_average_score(self):
     self.st.add_quiz(Grade("B"))
     self.assertEqual(9 / 2, self.st.get_average_score())
예제 #6
0
 def test_add_quiz(self):
     self.st.add_quiz(Grade("A"))
     self.assertEqual(2, self.st.get_scores_count())
     self.assertEqual(10, self.st.get_total_score())
예제 #7
0
 def test_get_grade_with_sign(self):
     grade = Grade("B+")
     self.assertEqual(4.3, grade.get_grade())
예제 #8
0
 def setUp(self):
     self.g = Grade("A")