def test_average_mark(self): s = Student('Imie', 'Nazwisko', 'Klasa') s.is_present(1, True) s.is_present(2, True) s.add_mark(1, 5) s.add_mark(2, 4) self.assertEqual(s.average_mark(), 4.5)
def setUp(self): self.student_instance = Student("Jan", "Nowak")
def setUp(self): self.student_instance = Student("Adam", "Kawa") self.schoolclass_instance = SchoolClass("A", [student_instance])
def test_init_args_type(self): assertRaises(Exception, Student(1, 5))
def setUp(self): self.fname = "Tomasz", self.sname = "Abacki" self.test = Student(self.fname, self.sname)
def test_addgrade(self): testgrade = Grade(5,"Math") test_inst = Student("Tomasz","Abacki")
def test_not_bool(self): s = Student('Imie', 'Nazwisko', 'Klasa') self.assertEqual(not_bool(s), True)
def test_add_mark(self): s = Student('Imie', 'Nazwisko', 'Klasa') s.is_present(1, True) s.add_mark(1, 3) self.assertEqual(s.marks_in_day[1], 3)
def test_is_present(self): s = Student('Imie', 'Nazwisko', 'Klasa') self.assertEqual(s.is_present(1, True), s.marks_in_day[1])