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())
Exemplo n.º 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")
Exemplo n.º 5
0
 def test_get_average_score(self):
     self.st.add_quiz(Grade("B"))
     self.assertEqual(9 / 2, self.st.get_average_score())
Exemplo n.º 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())
Exemplo n.º 7
0
 def test_get_grade_with_sign(self):
     grade = Grade("B+")
     self.assertEqual(4.3, grade.get_grade())
Exemplo n.º 8
0
 def setUp(self):
     self.g = Grade("A")